Skip to main content

Request

GET /api/v1/analytics/export

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key

Query parameters

ParameterTypeDefaultDescription
typestringcsvcsv or json
datastringdevicesdevices or events
periodstring30d1d, 7d, 30d, or 90d

Example

# Export device data as CSV
curl "https://grantiva.io/api/v1/analytics/export?type=csv&data=devices&period=30d" \
  -H "X-API-Key: aat_your_api_key" \
  -o devices.csv

# Export attestation events as JSON
curl "https://grantiva.io/api/v1/analytics/export?type=json&data=events&period=7d" \
  -H "X-API-Key: aat_your_api_key" \
  -o events.json

Response

  • CSV: File download with headers (Content-Type: text/csv)
  • JSON: Array of objects