Query Logs

List workflow execution logs with advanced filtering and cursor-based pagination. Supports filtering by workflow, trigger type, date range, duration, cost, and more.

GET/api/v1/logs
X-API-Key<token>

Your Sim API key (personal or workspace). Generate one from the Sim dashboard under Settings > API Keys.

In: header

Query Parameters

workspaceId*string

The unique identifier for your workspace.

workflowIds?string

Comma-separated list of workflow IDs to filter by. Only logs from these workflows will be returned.

folderIds?string

Comma-separated list of folder IDs. Returns logs for all workflows within these folders.

triggers?string

Comma-separated trigger types to filter by: api, webhook, schedule, manual, chat.

level?string

Filter logs by severity level. info for successful executions, error for failed ones.

startDate?string

Only return logs after this ISO 8601 timestamp (inclusive).

Formatdate-time
endDate?string

Only return logs before this ISO 8601 timestamp (inclusive).

Formatdate-time
executionId?string

Filter by an exact execution ID. Useful for looking up a specific run.

minDurationMs?integer

Only return logs where execution took at least this many milliseconds.

maxDurationMs?integer

Only return logs where execution took at most this many milliseconds.

minCost?number

Only return logs where execution cost at least this amount in USD.

maxCost?number

Only return logs where execution cost at most this amount in USD.

model?string

Filter by the AI model used during execution (e.g., gpt-4o, claude-sonnet-4-20250514).

details?string

Response detail level. basic returns summary fields only. full includes execution data, trace spans, and outputs.

includeTraceSpans?boolean

When true, includes block-level execution trace spans with timing and input/output data.

includeFinalOutput?boolean

When true, includes the workflow's final output in each log entry.

limit?integer

Maximum number of log entries to return per page.

cursor?string

Pagination cursor returned from a previous request's nextCursor field.

order?string

Sort order by execution start time. desc returns newest first.

Response Body

application/json

application/json

application/json

application/json

curl -X GET \  "https://www.sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": [
    {
      "id": "log_7x8y9z0a1b",
      "workflowId": "wf_1a2b3c4d5e",
      "executionId": "exec_9f8e7d6c5b",
      "level": "info",
      "trigger": "api",
      "startedAt": "2025-06-20T14:15:22Z",
      "endedAt": "2025-06-20T14:15:23Z",
      "totalDurationMs": 1250,
      "cost": {
        "total": 0.0032
      },
      "files": null
    }
  ],
  "nextCursor": "string",
  "limits": {
    "workflowExecutionRateLimit": {
      "sync": {
        "requestsPerMinute": 60,
        "maxBurst": 10,
        "remaining": 59,
        "resetAt": "2025-06-20T14:16:00Z"
      },
      "async": {
        "requestsPerMinute": 60,
        "maxBurst": 10,
        "remaining": 59,
        "resetAt": "2025-06-20T14:16:00Z"
      }
    },
    "usage": {
      "currentPeriodCost": 1.25,
      "limit": 50,
      "plan": "pro",
      "isExceeded": false
    }
  }
}
{
  "error": "string",
  "details": [
    {}
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}