Get the logs for an environment
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/applications/test-app/environments/test-env/logs?limit=50&order=asc&includeTotal=false';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/applications/test-app/environments/test-env/logs?limit=50&order=asc&includeTotal=false' \ --header 'Authorization: Bearer <token>'Retrieves logs from CloudWatch for the specified environment with optional filtering by time range, container, and literal text. Newest-first by default; pass the nextToken from the previous response to fetch the next page.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation ID
Example
test-orgThe application ID
Example
test-appThe environment ID
Example
test-envQuery Parameters
Section titled “Query Parameters”Start time for log retrieval (ISO 8601 format or Unix timestamp)
End time for log retrieval (ISO 8601 format or Unix timestamp)
Filter logs by specific container name
Literal, case-sensitive text to match anywhere in the log message
Maximum number of log entries to return per page (default 50)
Opaque pagination token from the previous response. Pass back unchanged to fetch the next page.
Sort order. desc returns newest first, asc returns oldest first.
When true, the response pagination object includes the total log count for the time range. Adds 1-2 seconds of latency.
Responses
Section titled “Responses”The logs
object
Array of log events
object
Unix timestamp in milliseconds
Log message content
Unix timestamp in milliseconds when CloudWatch ingested the event
CloudWatch log stream, named container/container/taskId
CloudWatch log group the events were read from
object
Page size that was applied
True when another page is available
Token for the next page. Present only when hasMore is true.
Total events in the time range. Present only when includeTotal=true.
Ceil(total / limit). Present only when includeTotal=true.
Same as pagination.nextToken; kept for backward compatibility
Examplegenerated
{ "logEvents": [ { "timestamp": 1, "message": "example", "ingestionTime": 1, "logStreamName": "example" } ], "logGroupName": "example", "pagination": { "limit": 1, "hasMore": true, "nextToken": "example", "total": 1, "totalPages": 1 }, "nextToken": "example"}Invalid startTime or endTime
The environment not found
Validation error
