List Logs

List workflow execution logs for a workspace with filters, selectable detail, and opaque cursor pagination. This list predates the shared sort convention: it has no sortBy (the sort column is fixed to execution start time) and spells the direction order rather than sortOrder. Trace spans are stored separately from the log row and are pruned on their own retention schedule: includeTraceSpans=true on a run whose stored spans have aged out returns traceSpans: [] rather than an error, so an empty array does not mean the run recorded no spans.

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

Your Sim API key, personal or workspace-scoped. Generate one from the Sim dashboard under Settings > API Keys. A workspace API key is not accepted everywhere: operations that act on behalf of a specific human — administrative reads, secret access, and irreversible or governance-affecting writes — always reject it, whatever role the key carries. Each such operation says so in its own description, and the rejection surfaces as 403 unless the operation conceals unauthorized resources, in which case it is reported as 404. Use a personal API key for those.

In: header

Query Parameters

workspaceId*string

Workspace whose execution logs should be returned.

Length1 <= length
workflowIds?string

Comma-separated workflow identifiers to include.

triggers?string

Comma-separated trigger types to include.

level?string

Severity level to include.

Value in"info" | "error"
startDate?string

Only include runs started at or after this ISO 8601 timestamp.

endDate?string

Only include runs started at or before this ISO 8601 timestamp.

minDurationMs?number

Minimum total execution duration in milliseconds.

maxDurationMs?number

Maximum total execution duration in milliseconds.

minCost?number

Minimum execution cost in USD.

maxCost?number

Maximum execution cost in USD.

model?string

AI model used during execution.

details?string

Response detail level.

Default"basic"
Value in"basic" | "full"
includeTraceSpans?boolean

Whether to include block-level trace spans.

includeFinalOutput?boolean

Whether to include the final workflow output.

limit?number

Maximum log entries per page, clamped to 1–1000.

Default100
cursor?string

Opaque cursor returned by a previous page.

order?string

Sort order by execution start time.

Default"desc"
Value in"desc" | "asc"
runId?string

Exact run identifier to match.

Length1 <= length
folderPaths?string

Comma-separated workflow folder paths to include.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.sim.ai/api/v2/logs?workspaceId=string"
{
  "data": [
    {
      "runId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13",
      "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
      "deploymentVersionId": "dep_2c4e6a8b0d1f",
      "status": "completed",
      "level": "info",
      "trigger": "api",
      "startedAt": "2026-01-15T10:30:00.000Z",
      "endedAt": "2026-01-15T10:30:01.250Z",
      "totalDurationMs": 1250,
      "cost": {
        "total": 0.0032
      },
      "files": null
    }
  ],
  "nextCursor": "eyJzdGFydGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwMFoifQ=="
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request is invalid."
  }
}