Prisma
API Referenceanalytics

Export Data

Accept an analytics-data export request and dispatch it asynchronously. Creates a pending Job + pre-materialized file row, publishes a trigger message to the analytics-export topic, and returns a 202 with the polling URL so the worker can stream the file in the background.

POST
/api/v1/analytics/export/data

Authorization

AuthorizationBearer <token>

In: header

Header Parameters

X-API-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X post "https://prisma.your-company.com/api/v1/analytics/export/data" \  -H "Content-Type: application/json" \  -d '{    "data_quality_threshold": 0.85,    "date_range_end": "2026-03-22T14:30:00Z",    "date_range_start": "2026-01-01T00:00:00Z",    "domains": [      "healthcare"    ],    "enable_powerbi_optimizations": true,    "evaluators": [      "faithfulness"    ],    "file_format": "csv",    "include_analytics": true,    "include_controls": true,    "include_knowledge_context": true,    "project_ids": [      "550e8400-e29b-41d4-a716-446655440001"    ],    "workspace_id": "550e8400-e29b-41d4-a716-446655440000"  }'
{
  "created_at": "2026-05-15T14:30:00Z",
  "file_id": "550e8400-e29b-41d4-a716-446655440099",
  "file_url": "/api/v1/files/550e8400-e29b-41d4-a716-446655440099/content",
  "job_id": "550e8400-e29b-41d4-a716-446655440010",
  "status": "pending",
  "status_url": "/api/v1/analytics/export/jobs/550e8400-e29b-41d4-a716-446655440010"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}