Get CDN access logs for a project
const 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';const options = {method: 'GET'};
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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organization machine name
Example
test-orgThe project machine name
Example
test-projectQuery Parameters
Section titled “Query Parameters”Maximum number of log entries to return per page (default 100)
Start of the time range. ISO 8601 or Unix epoch milliseconds.
Example
2024-11-16T00:00:00ZEnd of the time range. ISO 8601 or Unix epoch milliseconds.
Example
2024-11-16T23:59:59ZCloudWatch 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 = 404Only return entries for this domain
Example
www.example.comOpaque pagination token from the previous response. Pass back unchanged to fetch the next page.
Responses
Section titled “Responses”Access log entries
object
Structured CloudFront access log entries. Each entry carries request, response, timing and cache fields as emitted by the edge.
object
Number of entries in this response
Token for the next page, or null when there are no more entries
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
object
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
object
Example
{ "error": true}Validation error
