Skip to content

Get the logs for an environment

GET
/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/logs
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.

organisation
required
string

The organisation ID

Example
test-org
application
required
string

The application ID

Example
test-app
environment
required
string

The environment ID

Example
test-env
startTime
string

Start time for log retrieval (ISO 8601 format or Unix timestamp)

endTime
string

End time for log retrieval (ISO 8601 format or Unix timestamp)

containerName
string

Filter logs by specific container name

filterPattern
string

Literal, case-sensitive text to match anywhere in the log message

limit
integer
default: 50 >= 1 <= 1000

Maximum number of log entries to return per page (default 50)

nextToken
string

Opaque pagination token from the previous response. Pass back unchanged to fetch the next page.

order
string
default: desc
Allowed values: asc desc

Sort order. desc returns newest first, asc returns oldest first.

includeTotal
boolean

When true, the response pagination object includes the total log count for the time range. Adds 1-2 seconds of latency.

The logs

Media typeapplication/json
object
logEvents

Array of log events

Array<object>
object
timestamp

Unix timestamp in milliseconds

integer format: int64
message

Log message content

string
ingestionTime

Unix timestamp in milliseconds when CloudWatch ingested the event

integer format: int64
nullable
logStreamName

CloudWatch log stream, named container/container/taskId

string
nullable
logGroupName

CloudWatch log group the events were read from

string
nullable
pagination
object
limit

Page size that was applied

integer
hasMore

True when another page is available

boolean
nextToken

Token for the next page. Present only when hasMore is true.

string
nullable
total

Total events in the time range. Present only when includeTotal=true.

integer
nullable
totalPages

Ceil(total / limit). Present only when includeTotal=true.

integer
nullable
nextToken

Same as pagination.nextToken; kept for backward compatibility

string
nullable
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