Skip to content

Get CDN access logs for a project

GET
/api/v2/organizations/{organization}/projects/{project}/logs
curl --request GET \
--url 'https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/logs?limit=100&startTime=2024-11-16T00%3A00%3A00Z&endTime=2024-11-16T23%3A59%3A59Z&filter=%24.status_code%20%3D%20404&domain=www.example.com'

Retrieves CloudFront access log entries for an AWS-platform project. Results are always scoped to the project; the optional filter can only narrow them. Entries are returned oldest first; pass nextToken from the previous response to fetch the next page. Logs are retained for 30 days.

organization
required
string

The organization machine name

Example
test-org
project
required
string

The project machine name

Example
test-project
limit
integer
default: 100 >= 1 <= 10000

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

startTime
string

Start of the time range. ISO 8601 or Unix epoch milliseconds.

Example
2024-11-16T00:00:00Z
endTime
string

End of the time range. ISO 8601 or Unix epoch milliseconds.

Example
2024-11-16T23:59:59Z
filter
string

CloudWatch JSON filter expression AND-ed with the project constraint, e.g. $.status_code = 404. Outer braces are optional; nested braces are rejected.

Example
$.status_code = 404
domain
string

Only return entries for this domain

Example
www.example.com
nextToken
string

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

Access log entries

Media typeapplication/json
object
logs

Structured CloudFront access log entries. Each entry carries request, response, timing and cache fields as emitted by the edge.

Array<object>
object
timestamp
string format: date-time
nullable
project
string
nullable
domain
string
nullable
method
string
nullable
uri
string
nullable
status_code
integer
nullable
cache_status
string
nullable
client_ip
string
nullable
user_agent
string
nullable
bytes
integer
nullable
time_taken
number format: float
nullable
count

Number of entries in this response

integer
nextToken

Token for the next page, or null when there are no more entries

string
nullable
Examplegenerated
{
"logs": [
{
"timestamp": "2026-04-15T12:00:00Z",
"project": "example",
"domain": "example",
"method": "example",
"uri": "example",
"status_code": 1,
"cache_status": "example",
"client_ip": "example",
"user_agent": "example",
"bytes": 1,
"time_taken": 1
}
],
"count": 1,
"nextToken": "example"
}

Invalid filter or time range

Media typeapplication/json
object
error
boolean
message
string
Example
{
"error": true
}

Unauthenticated

Token lacks the projects:read scope or the user lacks browse_projects

The project is not on the AWS platform, or its access logs are not enabled yet

Media typeapplication/json
object
error
boolean
message
string
Example
{
"error": true
}

Validation error