Executions
SDK platic.tools.functions.runs()
SDK platic.tools.functions.runs()
Each agent call, manual run, or test records an execution. It includes the result, logs, and HTTP calls, without secret values.
The first request lists the executions of all functions; the second, those of a single function. Both go from newest to oldest.
Example
curl "https://api.platic.ai/v1/tools/functions/runs?limit=20" \
-H "Authorization: Bearer $PLATIC_API_KEY"
curl "https://api.platic.ai/v1/tools/functions/$FUNCTION_ID/runs" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.tools.functions.runs({ limit: 20 });
await platic.tools.functions.runs({ functionId: "fn_123" }); Parameters
| Parameter | In | Type | Description | Required |
|---|---|---|---|---|
functionId | path | string | Function ID. Only on the second route | ✓ |
limit | query | integer | How many to return, from 1 to 100. Default, 50 | — |
pageToken | query | string | The previous page's nextPageToken | — |
workspace | query | string | Only if the credential covers several workspaces: the workspace to act in | — |
Response
{
"status": "success",
"data": [
{
"id": "run_8d1f",
"functionId": "Hk2s9QmXc1",
"functionName": "tax_id_lookup",
"version": 1,
"trigger": "agent",
"ok": true,
"durationMs": 412,
"inputPreview": "{\"taxId\":\"XAXX010101000\"}",
"outputPreview": "{\"found\":true,\"name\":\"EXAMPLE COMPANY INC\"}",
"logs": ["info response {\"status\":200}"],
"httpCalls": [
{ "method": "POST", "host": "api.example.com", "status": 200, "durationMs": 380 }
],
"agentId": "Qm3vT8yLp2",
"conversationId": "c1F9aZr7Kd",
"at": "2026-11-24T18:05:00.000Z"
},
{
"id": "run_7a02",
"functionId": "Hk2s9QmXc1",
"functionName": "tax_id_lookup",
"version": "draft",
"trigger": "test",
"ok": false,
"errorCode": "EGRESS_DENIED",
"errorMessage": "La función intentó llamar a un dominio que no está permitido.",
"durationMs": 95,
"logs": [],
"httpCalls": [],
"actor": "user:8sKd2LxQp0",
"at": "2026-11-24T17:58:00.000Z"
}
],
"nextPageToken": "eyJhdCI6IjIwMjYtMTEtMjRUMTg6MDU6MDAuMDAwWiJ9"
} Response fields
| Field | Type | Description |
|---|---|---|
nextPageToken | string | null | For the next page: send it as pageToken. null when there are no more |
data[].id | string | Execution ID |
data[].functionId, functionName | string | The function that ran |
data[].version | integer | string | The version that ran, or "draft" in a test |
data[].trigger | string | Who ran it: agent, manual or test |
data[].ok | boolean | Whether it finished well |
data[].errorCode, errorMessage | string | When it failed. See errors inside an execution |
data[].durationMs | integer | Duration |
data[].inputPreview, outputPreview | string | Excerpt of the input and the output, up to 4 KB each |
data[].logs | string[] | What the code wrote with log |
data[].httpCalls | array | Each call with method, host, status and durationMs |
data[].agentId, conversationId | string | The agent and the conversation, when an agent called it |
data[].actor | string | Who ran it by hand or tested it |
data[].at | string | ISO 8601 date |
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | limit out of range, invalid pageToken, or the credential covers several workspaces and workspace is missing |
403 | FORBIDDEN | The person behind the token does not have access to Integrations |
404 | NOT_FOUND | The function does not exist in this workspace |
Notes
- The executions of a deleted function are kept for 30 days.
- For the next page, send
nextPageTokenaspageToken.cursoris also accepted as an alias forpageToken. - Secret values never appear: Platica removes them before storing.