Launch Week 02 wrapped — explore all five launches

Get Export

GEThttps://api.confident-ai.com/v2/projects/{projectId}/audit-logs/exports/{exportId}

Retrieves a project audit log export, so that a caller can poll one it started. status is IN_PROGRESS while the file is being written, COMPLETED once the file is in storage and ready to download, or ERRORED if the run failed, in which case errorMessage says why. rowCount is null until the export completes and then reports how many audit logs its file holds, and startTime and endTime are the period that file covers.

Poll here rather than at the download endpoint, which has nothing to serve until status is COMPLETED. An export is kept for 24 hours after it was created, or 5 minutes once it has failed, after which this returns 404. The lookup is by id among the exports you started in this project and is not restricted to audit log exports, so an id belonging to another kind of export comes back with its own exportType.

GET/v2/projects/{projectId}/audit-logs/exports/{exportId}
curl -X GET "https://api.confident-ai.com/v2/projects/{projectId}/audit-logs/exports/{exportId}" \
  -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "<AUDIT-LOG-EXPORT-ID>",
    "projectId": null,
    "organizationId": "<ORGANIZATION-ID>",
    "userId": "api",
    "status": "IN_PROGRESS",
    "exportType": "AUDIT_LOGS",
    "startTime": "2025-01-01T00:00:00.000Z",
    "endTime": "2025-04-01T00:00:00.000Z",
    "rowCount": 18432,
    "errorMessage": null,
    "createdAt": "2025-04-02T09:15:00.000Z",
    "completedAt": "2025-04-02T09:17:42.000Z"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The id of the project whose audit logs are exported. It must belong to the organization the API key belongs to.

  • exportIdstringRequired

    The id of the audit log export, as returned when it was created.

Response

Get Export succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    One run of an audit log export: the period it covers, where it is in its lifecycle, and how many audit logs its file holds once it completes.

    Show 12 propertiesHide 12 properties
    • idstring

      The id of the export, a UUID generated by Confident AI. Poll and download the export by this id.

    • projectIdstring | null

      The project whose audit logs the export covers, or null for an organization-wide export covering every project.

    • organizationIdstring

      The organization the export belongs to.

    • userIdstring

      The actor that started the export. api for an export started with an organization API key, or the user's id when started through an MCP OAuth session. An export is only visible to the actor that started it.

    • statusenum

      Where an export is in its lifecycle. It is created IN_PROGRESS, becomes COMPLETED once its file is written to storage, and becomes ERRORED if the run failed. Only a COMPLETED export has a file to download, and both COMPLETED and ERRORED are terminal.

      Show 3 enum valuesHide 3 enum values
      • IN_PROGRESS
      • COMPLETED
      • ERRORED
    • exportTypeenum

      The kind of data the file contains. Always AUDIT_LOGS for an export started at an audit log export endpoint.

      Show 5 enum valuesHide 5 enum values
      • TRACES
      • TRACES_WITH_SPANS
      • CONVERSATIONS
      • CONVERSATION_METRICS
      • AUDIT_LOGS
    • startTimestring | null

      Start of the period the export covers, inclusive. For an all-time export this is the timestamp of the oldest audit log matched.

    • endTimestring | null

      End of the period the export covers, inclusive. For an all-time export this is the timestamp of the newest audit log matched.

    • rowCountinteger | null

      How many audit logs were written to the file. Null until the export completes.

    • errorMessagestring | null

      Why the export failed, when status is ERRORED. Null otherwise.

    • createdAtstring

      When the export was started.

    • completedAtstring | null

      When the export finished or failed. Null while it is still running.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI