Request logs API
Requests made with your keys, and their errors.
The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.
GET/v1/request-logs
Recent API requests
Lists requests made with the organization's API keys in the last 30 days, newest first. Use it to find out why a call failed: filter to client_error or server_error, or paste a request id (the AirFone-Request-Id header every response carries) into q.
Who may call it: a person with settings or developer-management rights, or a secret key. Restricted and publishable keys are refused, because the log shows other keys' prefixes and callers' addresses.
Paging. Paged, newest first: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total. Paging is by keyset, so requests that arrive while you page never shift a page, skip an item or repeat one.
Filters combine. An outcome that is not one of the three values is ignored rather than refused. method is case-insensitive. q matches an exact request id or any part of the path; % and _ in it are stripped.
Requests are written in the background after the response is sent, so the call you just made may take a moment to appear. Read only.
Scope request-logs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
outcome | query | string | No | `ok` (status below 400), `client_error` (4xx) or `server_error` (5xx). Any other value is ignored. |
method | query | string | No | Only this HTTP method, such as `POST`. Case-insensitive. |
q | query | string | No | A request id, or part of the path. |
limit | query | integer | No | How many items to return. Default 50, at most 100. |
cursor | query | string | No | The `next_cursor` of the previous page. Opaque; never built by the client. |
GET/v1/request-logs/{id}
One API request
Returns one logged request by its request id (req_…), as quoted in the AirFone-Request-Id response header and in every error body. Quote the same id to support.
Only requests from the last 30 days exist; an older id, or an id from another organization, answers 404 with no hint which. The id is not a UUID, so it is taken as given after trimming spaces.
Who may call it: a person with settings or developer-management rights, or a secret key. Read only and safe to repeat.
Scope request-logs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | A request id, `req_…`. |
GET/v1/insights
Requests and errors per day
Counts of requests and errors for each UTC day, the ten most common error codes, and overall latency, drawn from the same request log as /v1/request-logs. It feeds the console's Insights page.
days is how many days back to count, including today. It defaults to 30 and is clamped to between 1 and 90, so a larger value quietly returns 90. The log only goes back 30 days, so values above 30 add empty days, not more history. per_day has one entry for every day in range, zero-filled, so it can be charted without gaps. An error is any request that answered 400 or above.
totals.p50_ms and p95_ms are null when there were no requests in range.
Who may call it: a person with settings or developer-management rights, or a secret key. Read only and safe to repeat.
Scope insights:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
days | query | integer | No | How many days back, including today. Clamped to 1 to 90. |