run_function
Execute a deployed function to test API endpoints. Inspect response body field names and types to align your frontend code with the backend.
Instructions
Execute a deployed function and return the real response. Use this to test your API endpoints.
Returns: { status, headers, body, logs, error, duration_ms }
Example: run_function({ project_id: 1, path: "/api/users", method: "GET" }) Example: run_function({ project_id: 1, path: "/api/users", method: "POST", body: { name: "Alice" } })
IMPORTANT: Always run_function on your API endpoints after writing them. Inspect the response body field names and types. Then write your frontend to match those exact names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID (e.g. proj_a8Kq7fR2xZ) | |
| path | Yes | Function route path (e.g. "/api/services") | |
| method | No | HTTP method | |
| body | No | Request body (for POST/PUT) | |
| headers | No | Additional request headers | |
| query | No | URL query parameters |