List log records
curl --request GET \
--url https://api.writer.com/api/observability/v1/organization/{organizationId}/logs/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.writer.com/api/observability/v1/organization/{organizationId}/logs/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.writer.com/api/observability/v1/organization/{organizationId}/logs/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": [
{
"record_type": "llm_call",
"log_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"inserted_at_ms": 1734600000000,
"model": "palmyra-x5",
"duration_ms": 1200
},
{
"record_type": "agent_run",
"log_id": "agent-run:run-123",
"inserted_at_ms": 1734600001000,
"agent_run_id": "run-123",
"root_agent_run_id": "run-123",
"run_status": "completed",
"duration_ms": null,
"model": "",
"prompt_tokens": null,
"completion_tokens": null,
"total_tokens": null
}
],
"pagination": {
"limit": 1000,
"has_more": true,
"next_cursor": null
}
}{
"code": "VALIDATION_ERROR",
"detail": "<string>"
}{
"code": "VALIDATION_ERROR",
"detail": "<string>"
}{
"code": "VALIDATION_ERROR",
"detail": "<string>"
}Observability API
List log records
Read LLM-call and agent-run records for the organization. Use order=tail to read an incremental stream that you resume with the x-next-cursor header, or order=browse to read a date window. The response is OTLP JSON by default; set format=native for Writer-native JSON.
GET
/
api
/
observability
/
v1
/
organization
/
{organizationId}
/
logs
/
export
List log records
curl --request GET \
--url https://api.writer.com/api/observability/v1/organization/{organizationId}/logs/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.writer.com/api/observability/v1/organization/{organizationId}/logs/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.writer.com/api/observability/v1/organization/{organizationId}/logs/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"result": [
{
"record_type": "llm_call",
"log_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"inserted_at_ms": 1734600000000,
"model": "palmyra-x5",
"duration_ms": 1200
},
{
"record_type": "agent_run",
"log_id": "agent-run:run-123",
"inserted_at_ms": 1734600001000,
"agent_run_id": "run-123",
"root_agent_run_id": "run-123",
"run_status": "completed",
"duration_ms": null,
"model": "",
"prompt_tokens": null,
"completion_tokens": null,
"total_tokens": null
}
],
"pagination": {
"limit": 1000,
"has_more": true,
"next_cursor": null
}
}{
"code": "VALIDATION_ERROR",
"detail": "<string>"
}{
"code": "VALIDATION_ERROR",
"detail": "<string>"
}{
"code": "VALIDATION_ERROR",
"detail": "<string>"
}Each API key can export logs only for its own organization. See Export logs for start points, cursor handling, delivery guarantees, and polling examples.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key. Each key can export logs only for its own organization.
Query Parameters
Was this page helpful?