Database endpoints
Report client diagnostics
Send an opted-in SDK's call diagnostics to the database's telemetry pipeline.
POST /v1/tenants/{tenant}/diagnostics
- Collect opted-in diagnosticsPrepare call timing, transport and outcome metadata.
- Submit the event batchOne invalid event rejects the request.
- Inspect accepted and droppedCheck how the telemetry pipeline handled the batch.
Before you start
Use your database bearer token.
Send only observed metadata from a client that has opted in. Replace the example path, version, request ID and timings; never include SQL, row data, credentials or stack traces.
Path parameters
| Field | Type | Required |
|---|---|---|
tenant | string | Required |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-oc-db-user | string | Optional | Acting database user (role, grant and row-policy checks). Send with x-oc-db-key. |
x-oc-db-key | string | Optional | API key of the x-oc-db-user user. |
Request body
application/json
Limits and accepted values
- 1 to 32 events per request.
- A request with one invalid event is refused whole (422 invalid_diagnostics) and relays nothing.
- Reporting is opt-in. Check whether your installed SDK exposes a diagnostics reporter; a local request observer does not automatically send events to this endpoint.
| Field | Type | Required |
|---|---|---|
events | object[] | Required |
Fields in events
| Field | Type | Required |
|---|---|---|
attempt | integer | Optional |
client | string | Required |
client_version | string | Required |
duration_ms | number | Required |
error_category | string | Optional |
error_code | string | Optional |
http_status | integer | Optional |
logical_request_id | string | Required |
method | string | Required |
outcome | string | Required |
path | string | Required |
request_id | string | Optional |
transport | string | Optional |
Read the result
accepted and dropped describe diagnostic events, not successful database queries. Send only opted-in call metadata; a single invalid event rejects the request rather than partially relaying it.
Response statuses
HTTP status reference
| Status | What to do |
|---|---|
| 202 | Accepted |
| 401 | Check the credential and Authorization header. |
| 402 | Check feature access or available credits. |
| 403 | Check tenant access, roles and permissions. |
| 413 | Split or reduce the request body. |
| 415 | Send the required Content-Type. |
| 422 | Correct the values or unsupported combination. |
| 429 | Honor Retry-After when present; back off. |
| 503 | Honor Retry-After when present; check write outcomes. |