Fetch the list of Consent Audit Log Exports | DataGrail Documentation

Fetch the list of Consent Audit Log Exports

GET https://www.example.com/api/v2/consent/audit_log

Returns a list of monthly consent audit log export files. Each export covers one calendar month and is updated nightly. Use the export id with the download endpoint to retrieve the file contents.

Request

Header Parameters

authorization stringrequired

Example: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9

Responses

Audit log exports fetched

Schema

data object[]

Array [

id integer

The unique identifier of the export.

Example: 30

export_month string

The first day of the month covered by this export.

Example: 2025-12-01

format string

The file format of the export.

Example: json

record_count integer

The number of consent log records in this export.

Example: 1250

file_size_bytes integer

The size of the export file in bytes.

Example: 524288

exported_at string

The timestamp when this export was generated.

Example: 2025-12-24T00:08:16.203303Z

start_time string

The start of the time range covered by this export.

Example: 2025-12-01T00:00:00Z

end_time string

The end of the time range covered by this export.

Example: 2025-12-24T00:07:14.001739Z

created_at string

The timestamp when this export record was created.

Example: 2025-12-24T00:08:16.203326Z

]

{
  "data": [
    {
      "id": 30,
      "export_month": "2025-12-01",
      "format": "json",
      "record_count": 1250,
      "file_size_bytes": 524288,
      "exported_at": "2025-12-24T00:08:16.203303Z",
      "start_time": "2025-12-01T00:00:00Z",
      "end_time": "2025-12-24T00:07:14.001739Z",
      "created_at": "2025-12-24T00:08:16.203326Z"
    }
  ]
}

Unauthorized

curl -L 'https://www.example.com/api/v2/consent/audit_log' \
-H 'Accept: application/json'