API reference
Logs
Request logs for API and MCP calls.
List request logs#
Every API and MCP request made by this account, newest first, with cursor pagination. Passport numbers are masked and secrets are never stored.
Parameters
Query parameters
| Name | Type | Description |
|---|---|---|
keyId | string | pattern: ^key_[a-f0-9]{32}$ |
status | string | one of: "2xx", "4xx", "5xx" |
channel | string | one of: "api", "mcp", "web", "admin" |
method | string | one of: "GET", "POST", "PATCH", "PUT", "DELETE" |
path | string (starts_with) | pattern: ^\/.*max length: 200 |
orderId | string | pattern: ^ord_[a-f0-9]{32}$ |
from | string (date-time) | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
to | string (date-time) | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ |
limit | integer | range: 1–100default: 50 |
cursor | integer | ≤ 9007199254740991> 0 |
Code samples
curl 'https://api.1fly.uz/v1/logs' \
-H "Authorization: Bearer $ONEFLY_API_KEY"const res = await fetch('https://api.1fly.uz/v1/logs', {
headers: {
Authorization: `Bearer ${process.env.ONEFLY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (request ${data.error.requestId})`);import os
import requests
resp = requests.get(
"https://api.1fly.uz/v1/logs",
headers={"Authorization": f"Bearer {os.environ['ONEFLY_API_KEY']}"},
timeout=30,
)
data = resp.json()
if not resp.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")Responses
200Logs.
{
"rows": [],
"nextCursor": null
}401Missing or invalid credentials.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | Quote this to support; also in the x-request-id header and the request log. |
issues (in error) | array<object> | Present for VALIDATION_FAILED: one entry per problem. |
path (in error.issues) | string | Example: passengers.0.lastName |
code (in error.issues) | string | |
message (in error.issues) | string |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}403The key lacks a required scope, or the account is suspended.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | Quote this to support; also in the x-request-id header and the request log. |
issues (in error) | array<object> | Present for VALIDATION_FAILED: one entry per problem. |
path (in error.issues) | string | Example: passengers.0.lastName |
code (in error.issues) | string | |
message (in error.issues) | string |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}500Unexpected error on our side; quote the requestId.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | Quote this to support; also in the x-request-id header and the request log. |
issues (in error) | array<object> | Present for VALIDATION_FAILED: one entry per problem. |
path (in error.issues) | string | Example: passengers.0.lastName |
code (in error.issues) | string | |
message (in error.issues) | string |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}Get one request log#
Includes query, request and response bodies (redacted, truncated over 16 KB).
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Log id. pattern: ^[0-9]+$ |
Code samples
curl 'https://api.1fly.uz/v1/logs/0' \
-H "Authorization: Bearer $ONEFLY_API_KEY"const res = await fetch('https://api.1fly.uz/v1/logs/0', {
headers: {
Authorization: `Bearer ${process.env.ONEFLY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (request ${data.error.requestId})`);import os
import requests
resp = requests.get(
"https://api.1fly.uz/v1/logs/0",
headers={"Authorization": f"Bearer {os.environ['ONEFLY_API_KEY']}"},
timeout=30,
)
data = resp.json()
if not resp.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")Responses
200Log entry.
{}401Missing or invalid credentials.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | Quote this to support; also in the x-request-id header and the request log. |
issues (in error) | array<object> | Present for VALIDATION_FAILED: one entry per problem. |
path (in error.issues) | string | Example: passengers.0.lastName |
code (in error.issues) | string | |
message (in error.issues) | string |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}403The key lacks a required scope, or the account is suspended.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | Quote this to support; also in the x-request-id header and the request log. |
issues (in error) | array<object> | Present for VALIDATION_FAILED: one entry per problem. |
path (in error.issues) | string | Example: passengers.0.lastName |
code (in error.issues) | string | |
message (in error.issues) | string |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}500Unexpected error on our side; quote the requestId.
| Field | Type | Description |
|---|---|---|
errorrequired | object | |
code (in error)required | string | Stable machine-readable code, e.g. VALIDATION_FAILED. |
message (in error)required | string | Human-readable explanation. |
requestId (in error)required | string | Quote this to support; also in the x-request-id header and the request log. |
issues (in error) | array<object> | Present for VALIDATION_FAILED: one entry per problem. |
path (in error.issues) | string | Example: passengers.0.lastName |
code (in error.issues) | string | |
message (in error.issues) | string |
{
"error": {
"code": "string",
"message": "string",
"requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
"issues": [
{
"path": "passengers.0.lastName",
"code": "string",
"message": "string"
}
]
}
}