Skip to main content
Retrieve all attributed events for your app within a given time window. Supports multiple output formats for data pipeline and analytics integrations.

Authentication

Every request must include an Authorization header containing your Appstack API key. You can find your API key in the Appstack dashboard under your app settings.
Authorization: <your-api-key>
API keys are scoped to a single app. The response will only include events for the app associated with the key.

Endpoint

GET https://data-retriever-api.appstack.tech/api/v1/export

Request

Query Parameters

timestamp
integer
required
Unix timestamp (seconds) defining the start of the export window. Returns all events from this timestamp up to the current time.Example: 1700000000
format
string
default:"json"
Output format for the response. Accepted values:
ValueDescription
jsonStructured JSON object (default)
ndjsonNewline-delimited JSON — one event per line
csvComma-separated values, returned as a file download
tsvTab-separated values, returned as a file download
xmlXML document, returned as a file download
xlsxExcel workbook (.xlsx), returned as a file download
parquetApache Parquet binary, returned as a file download

Example request

curl -X GET "https://data-retriever-api.appstack.tech/api/v1/export?timestamp=1700000000&format=json" \
  -H "Authorization: <your-api-key>"

Response

For format=json, the endpoint returns a JSON object. For all other formats, the response is streamed as a file download with the appropriate Content-Disposition header.

JSON response

{
  "data": [
    {
      "event_id": "abc123",
      "event_time": "2024-11-14T12:00:00Z",
      "event_name": "appstack_purchase",
      "appstack_id": "as_xyz789",
      "media_source": "meta",
      "campaign_id": "12345678",
      "campaign_name": "iOS - Broad - US",
      "adset_id": "98765432",
      "adset_name": "Interest - Gaming",
      "ad_id": "11223344",
      "ad_name": "Video - 15s",
      "matching_type": "exact_ip",
      "click_to_first_open_hours": 2,
      "confidence_score": "high",
      "country": "US",
      "os": "ios",
      "app_id": "com.example.app",
      "app_name": "My App",
      "install_type": "new_install",
      "revenue": 9.99,
      "currency": "USD"
    }
  ],
  "total_count": 1
}

Response fields

data
array
Array of attributed events.
total_count
integer
Total number of events returned.

Errors

StatusCodeDescription
401UnauthorizedMissing or invalid Authorization header.
422Unprocessable Entitytimestamp is missing, or format is not a valid value.
500Internal Server ErrorUnexpected error while fetching or building the export.

Error response shape

{
  "error": "Unauthorized",
  "detail": "Authorization header is required"
}