Download a specific audit log export | DataGrail Documentation

Download a specific audit log export

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

Downloads the contents of a specific monthly audit log export file. The response is a JSON file containing an array of individual consent audit log records, returned as an attachment.

Request

Path Parameters

id integerrequired

The ID of the audit log export to download.

Example: 30

Header Parameters

authorization stringrequired

Example: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9

Responses

Audit log export file downloaded

Schema

[
  {
    "consent_container_version_id": "3232ed80-72fb-4ac9-badc-1c8acef8cd1f",
    "consent_preferences": "{\n  \"cookieOptions\": [\n    {\n      \"gtm_key\": \"dg-consent-category-54b4ce\",\n      \"isEnabled\": true\n    },\n    {\n      \"gtm_key\": \"dg-consent-category-6994d6\",\n      \"isEnabled\": true\n    },\n    {\n      \"gtm_key\": \"dg-consent-category-4e97c2\",\n      \"isEnabled\": true\n    },\n    {\n      \"gtm_key\": \"dg-consent-category-dfb0b8\",\n      \"isEnabled\": true\n    },\n    {\n      \"gtm_key\": \"dg-consent-category-5deaeb\",\n      \"isEnabled\": true\n    },\n    {\n      \"gtm_key\": \"dg-consent-category-d4e8ec\",\n      \"isEnabled\": true\n    }\n  ],\n  \"isCustomised\": true\n}\n",
    "consent_state": "Accept All",
    "created_at": "2024-11-14T19:53:25.223024Z",
    "customer_supplied": "string",
    "dg_customer_id": "c30be0d2-795f-40af-9f70-502b83f7bb68",
    "dg_id": "3232ed80-72fb-4ac9-badc-1c8acef8cd1f",
    "languages": "en-US,en;q=0.9",
    "method": "optout",
    "country": "US",
    "region": "CA",
    "url": "https://www.beepyoinkslam.lol/#",
    "url_domain": "www.beepyoinkslam.lol",
    "policyName": "GDPR",
    "defaultPolicy": false,
    "locale_code": ""
  }
]

Unauthorized

Bad Gateway when export fetch fails

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