List and filter logs

GET/v2/logs
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

Query Parameters

procedure_ids?array<>

Filter logs by procedure ID(s).

search_query?string

Search query to filter logs by message content.

levels?array<>

Filter logs by level.

timestamp_after?string

Filter logs with timestamp after this date (inclusive).

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatdate-time
timestamp_before?string

Filter logs with timestamp before this date (inclusive).

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatdate-time
source_files?array<string>

Filter logs by source file path.

run_ids?array<>

Filter logs by run ID.

run_outcomes?array<>

Filter logs by run outcome.

procedure_versions?array<string>

Filter logs by the procedure version tag of their run.

deployment_ids?array<>

Filter logs by the deployment ID their run executed from.

environments?array<>

Filter logs by the deployment environment of their run (production, preview, development).

serial_numbers?array<string>

Filter logs by unit serial number.

part_numbers?array<string>

Filter logs by unit part number.

revision_numbers?array<string>

Filter logs by unit revision number.

batch_numbers?array<string>

Filter logs by unit batch number.

samples?array<>

Filter logs by unit sample class.

created_by_station_ids?array<>

Filter logs by station ID.

created_by_user_ids?array<>

Filter logs by user ID.

sort_by?string

Field to sort results by.

Default"created_at"
Value in"created_at" | "level" | "run_id" | "outcome"
sort_order?string

Sort order direction.

Default"desc"
Value in"asc" | "desc"
limit?integer

Maximum number of logs to return.

Default50
Range1 <= value <= 100
cursor?integer

Cursor for pagination. Use next_cursor from previous response to fetch next page.

Range-9007199254740991 <= value <= 9007199254740991

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v2/logs"
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "level": "INFO",
      "message": "Test execution started",
      "created_at": "2024-01-15T10:30:00Z",
      "source_file": "test_procedure.py",
      "line_number": 42,
      "run": {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "outcome": "PASS",
        "started_at": "2024-01-15T10:25:00Z"
      },
      "unit": {
        "id": "550e8400-e29b-41d4-a716-446655440002",
        "serial_number": "SN-2024-001234"
      },
      "procedure": {
        "id": "550e8400-e29b-41d4-a716-446655440005",
        "name": "Functional Test"
      },
      "created_by_user": {
        "id": "550e8400-e29b-41d4-a716-446655440003",
        "name": "John Doe",
        "email": "john@example.com"
      },
      "created_by_station": {
        "id": "550e8400-e29b-41d4-a716-446655440004",
        "name": "Assembly Station 01"
      }
    }
  ],
  "meta": {
    "has_more": true,
    "next_cursor": 100
  }
}
{
  "message": "Bad request",
  "code": "BAD_REQUEST",
  "issues": []
}
{
  "message": "Unauthorized",
  "code": "UNAUTHORIZED",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?