List and filter logs
/v2/logsAuthorization
api_key API key for authentication. Use format: Bearer YOUR_API_KEY
In: header
Query Parameters
Filter logs by procedure ID(s).
Search query to filter logs by message content.
Filter logs by level.
Filter logs with timestamp after this date (inclusive).
^(?:(?:\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))$date-timeFilter logs with timestamp before this date (inclusive).
^(?:(?:\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))$date-timeFilter logs by source file path.
Filter logs by run ID.
Filter logs by run outcome.
Filter logs by the procedure version tag of their run.
Filter logs by the deployment ID their run executed from.
Filter logs by the deployment environment of their run (production, preview, development).
Filter logs by unit serial number.
Filter logs by unit part number.
Filter logs by unit revision number.
Filter logs by unit batch number.
Filter logs by unit sample class.
Filter logs by station ID.
Filter logs by user ID.
Field to sort results by.
"created_at""created_at" | "level" | "run_id" | "outcome"Sort order direction.
"desc""asc" | "desc"Maximum number of logs to return.
501 <= value <= 100Cursor for pagination. Use next_cursor from previous response to fetch next page.
-9007199254740991 <= value <= 9007199254740991Response 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?