Skip to content

Execution History

Every tool execution is recorded with its input, output, duration, actor, and outcome. Use the execution history to audit activity, debug failures, and monitor usage.

Endpoint

MethodPathDescriptionAuth
GET/connectors/instances/:id/executionsList execution historyJWT

Execution Object

json
{
  "id": "exec_xyz789",
  "instanceId": "inst_abc123",
  "toolId": "tool_abc123",
  "toolKey": "send_message",
  "status": "success",
  "actorId": "usr_abc",
  "actorType": "chainer",
  "runId": null,
  "durationMs": 342,
  "httpStatus": 200,
  "errorMessage": null,
  "createdAt": "2026-03-23T10:05:00Z"
}

Execution Object Fields

FieldTypeDescription
idstringUnique execution ID
instanceIdstringThe connector instance that was used
toolIdstringThe tool that was executed
toolKeystringTool key (e.g. send_message)
statusstringsuccess or error
actorIdstringID of the user or agent that triggered execution
actorTypestringchainer (user) or agent
runIdstring | nullWorkflow run ID if executed as part of a workflow; null for direct calls
durationMsnumberExecution time in milliseconds
httpStatusnumber | nullHTTP status from the external service, if applicable
errorMessagestring | nullError detail if status is error; null on success
createdAtstringISO 8601 timestamp of when execution occurred

Input and output payloads are stored internally but are not returned in list responses to keep responses lightweight. Contact support if you need detailed payload export for compliance purposes.


GET /connectors/instances/:id/executions

List tool execution history for a connector instance, ordered by most recent first.

Request

Path Parameters

ParameterTypeDescription
idstringInstance ID

Query Parameters

ParameterTypeRequiredDescription
limitnumberNoMax results per page (default: 20, max: 100)
offsetnumberNoPagination offset (default: 0)

Response

Response Example

json
{
  "data": [
    {
      "id": "exec_xyz789",
      "instanceId": "inst_abc123",
      "toolId": "tool_abc123",
      "toolKey": "send_message",
      "status": "success",
      "actorId": "usr_abc",
      "actorType": "chainer",
      "runId": null,
      "durationMs": 342,
      "httpStatus": 200,
      "errorMessage": null,
      "createdAt": "2026-03-23T10:05:00Z"
    },
    {
      "id": "exec_abc001",
      "instanceId": "inst_abc123",
      "toolId": "tool_abc123",
      "toolKey": "send_message",
      "status": "error",
      "actorId": "agent_def",
      "actorType": "agent",
      "runId": "run_wf123",
      "durationMs": 187,
      "httpStatus": 404,
      "errorMessage": "channel_not_found: The channel #unknown was not found",
      "createdAt": "2026-03-23T09:55:00Z"
    }
  ],
  "meta": {
    "total": 42,
    "limit": 20,
    "offset": 0,
    "hasNextPage": true
  }
}

Code Examples

bash
curl "https://api.chainabit.com/api/v1/connectors/instances/$INSTANCE_ID/executions?limit=20&offset=0" \
  -H "Authorization: Bearer $TOKEN"
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const INSTANCE_ID = process.env.INSTANCE_ID;

const response = await fetch(
  `${BASE_URL}/connectors/instances/${INSTANCE_ID}/executions`,
  {
    headers: { Authorization: `Bearer ${TOKEN}` },
  },
);
const { data, meta } = await response.json();
python
import requests, os

BASE_URL = os.environ["BASE_URL"]
TOKEN = os.environ["TOKEN"]
INSTANCE_ID = os.environ["INSTANCE_ID"]

response = requests.get(
    f"{BASE_URL}/connectors/instances/{INSTANCE_ID}/executions",
    params={"limit": 20, "offset": 0},
    headers={"Authorization": f"Bearer {TOKEN}"},
)
result = response.json()
data, meta = result["data"], result["meta"]

Pagination

See Pagination Reference for details on using limit, offset, and hasNextPage to page through results.

bash
# Page 2
curl "https://api.chainabit.com/api/v1/connectors/instances/$INSTANCE_ID/executions?limit=20&offset=20" \
  -H "Authorization: Bearer $TOKEN"

Built with purpose.