Export Project Usage
This endpoint exports project usage data including activity metrics, involved users per project, and resource consumption statistics.
POST /export/projects
Try it
Example cURL
curl --request POST \
--url https://api.langdock.com/export/projects \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"from": {
"date": "2024-01-01T00:00:00.000Z",
"timezone": "UTC"
},
"to": {
"date": "2024-01-31T23:59:59.999Z",
"timezone": "UTC"
}
}
'Data included
The project export contains:
Project activity metrics
Involved users per project
Resource consumption
Message counts per project
Time-based usage patterns
Project collaboration statistics
Additional Information: For details on prerequisites, rate limits, and export size limits, see the main Usage Export API documentation.
Headers
Authorization (string, required) API key as Bearer token with USAGE_EXPORT_API scope. Format: "Bearer YOUR_API_KEY"
Content-Type: application/json
Request body
application/json — Request body for usage export endpoints
{ "from": { "date": "string (date-time, required)", "timezone": "string (required)" }, "to": { "date": "string (date-time, required)", "timezone": "string (required)" } }
Examples:
from.date: "2024-01-01T00:00:00.000Z"
from.timezone: "UTC"
to.date: "2024-01-31T23:59:59.999Z"
to.timezone: "UTC"
Responses
200 — Export successful
400, 401, 404 — Error responses
200 Example response
Response fields:
success (boolean) — Indicates if the export was successful (example: true)
data (object) — Export data information
data.filePath (string) — Path to the generated export file (example: "assistants-usage/...csv")
data.downloadUrl (string, uri) — Signed URL to download the export file
data.dataType (enum) — Type of data exported. Available options:
assistants,users,workflows,projects,modelsdata.recordCount (integer) — Number of records in the export
data.dateRange (object) — Actual date range of the exported data
Links
Main Usage Export API docs: https://docs.langdock.com/api-endpoints/usage-export/intro-to-usage-export-api
Export Workflow Usage: https://docs.langdock.com/api-endpoints/usage-export/export-workflows
Export Model Usage: https://docs.langdock.com/api-endpoints/usage-export/export-models

