Skip to content

Ingest SDK diagnostic logs

POST
/api/v1/diagnostic-logs/ingest
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/v1/diagnostic-logs/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "tenant_id": "tenant_123", "client_id": "client_123", "client_secret": "client_secret", "logs": [ { "category": "http_request", "timestamp": "2026-02-02T10:00:00.000Z", "level": "info", "message": "Request completed", "metadata": { "path": "/userinfo" } } ] }'

Accepts SDK diagnostic log batches after client credential validation, privacy filtering, and tenant resolution, then writes sanitized entries to R2. The tenant’s diagnostic logging settings apply (Settings API namespace); when they cannot be read the request is refused with 503 and nothing is stored. Entries are labelled source sdk by the server, whatever the sender claims. Secrets are never stored in clear text, in any storage mode or step; identifiers such as requestId are validated; in full storage mode personal data is redacted unless diagnostic-logging.filter_pii is off.

JSON request body.

Media type application/json
object
tenant_id
string
client_id
required
string
client_secret
string
logs
required
Array<object>
object
category
required
string
timestamp
required
string
level
string
message
string
metadata
object
key
additional properties
key
additional properties
key
additional properties
Example
{
"tenant_id": "tenant_123",
"client_id": "client_123",
"client_secret": "client_secret",
"logs": [
{
"category": "http_request",
"timestamp": "2026-02-02T10:00:00.000Z",
"level": "info",
"message": "Request completed",
"metadata": {
"path": "/userinfo"
}
}
]
}

Diagnostic log ingest result after writing sanitized entries.

Media type application/json
object
success
required
boolean
entriesWritten
required
integer
objectKeys
required
Array<string>
key
additional properties
Example
{
"success": true,
"entriesWritten": 1,
"objectKeys": [
"diagnostic-logs/tenant_123/client_123/auth_decision/2026/06/01/logs.jsonl"
]
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}