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.
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 |