Skip to content
Management API Reference

Gets project's logs
deprecated

get/v1/projects/{ref}/analytics/endpoints/logs.all

Executes a SQL query on the project's logs.

Either the iso_timestamp_start and iso_timestamp_end parameters must be provided. If both are not provided, only the last 1 minute of logs will be queried. The timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.

Note: Unless the sql parameter is provided, only edge_logs will be queried. See the log query docs for all available sources.

OAuth scopes

  • analytics:read

Path parameters

  • ref
    Required
    string

    Project ref

Query parameters

  • sql
    Optional
    string

    Custom SQL query to execute on the logs. See querying logs for more details.

  • iso_timestamp_start
    Optional
    string
  • iso_timestamp_end
    Optional
    string

Response codes

  • 200
  • 401
  • 402
  • 403
  • 429

Response (200)

1
{
2
"result": [
3
null
4
],
5
"error": "lorem"
6
}