api-testerlisted
Install: claude install-skill gooseworks-ai/goose-skills
# API Tester - Test Any API Endpoint
## Setup
Read your credentials from ~/.gooseworks/credentials.json:
```bash
export GOOSEWORKS_API_KEY=$(python3 -c "import json;print(json.load(open('$HOME/.gooseworks/credentials.json'))['api_key'])")
export GOOSEWORKS_API_BASE=$(python3 -c "import json;print(json.load(open('$HOME/.gooseworks/credentials.json')).get('api_base','https://api.gooseworks.ai'))")
```
If ~/.gooseworks/credentials.json does not exist, tell the user to run: `npx gooseworks login`
All endpoints use Bearer auth: `-H "Authorization: Bearer $GOOSEWORKS_API_KEY"`
Test API endpoints, validate responses, and generate documentation examples.
## Workflow
### Step 1: Test GET Endpoints
Make GET requests to test endpoints:
```bash
curl -s -X POST $GOOSEWORKS_API_BASE/v1/proxy/orthogonal/run \
-H "Authorization: Bearer $GOOSEWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api":"linkup","path":"/fetch","body":{"url":"https://api.example.com/health"}}'
```
### Step 2: Test POST Endpoints
Test POST requests by fetching API docs:
```bash
curl -s -X POST $GOOSEWORKS_API_BASE/v1/proxy/orthogonal/run \
-H "Authorization: Bearer $GOOSEWORKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api":"scrapegraph","path":"/v1/smartscraper"}'
"website_url": "https://api.example.com/docs",
"user_prompt": "Extract all API endpoints, methods, parameters, and example responses"
}'
```
### Step 3: Get API Documentation
Fetch and parse API docs:
```