run_api_endpoint
Send an endpoint against an environment and return the real response (status, headers, body up to 20 KB). A local environment goes through the user's tunnel to their localhost (the CLI must be running); staging/prod are sent from Pipehero's cloud (Pro/Team) to public addresses only. Sending to a prod environment with a write method needs confirm_write_to_prod: true, which you should only pass after the user agrees. Use it to check that the code you wrote behaves as documented.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"collection_id": "<collection_id>",
"environment": "<environment>"
},
"name": "run_api_endpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Route path as written in the code, e.g. /v1/charges/:id or /v1/charges/{id}. | |
| method | No | HTTP method of the route, e.g. POST. Use with path instead of endpoint_id. | |
| variables | No | Values for {{variables}} the environment doesn't define, e.g. {"id": "ch_123"}. | |
| endpoint_id | No | Id of the endpoint. Alternative to method + path. | |
| environment | Yes | Environment name or id, e.g. local. | |
| collection_id | Yes | Id from list_api_collections. | |
| confirm_write_to_prod | No | Needed to send a write method (POST, PUT, PATCH, DELETE) to a prod environment. Only pass true after the user agrees. |