Skip to content

Prepare analytics datasets

Request

Orders the build of the listed datasets, or of every dataset the acting user may read when datasets is omitted. A dataset that is already ordered is not ordered again; its use is extended. Datasets the user may not read are skipped. The response is the build status of each requested dataset; poll listAnalyticsDatasets or getAnalyticsDataset until ready.

Security
OAuth2(Required scopes: analytics:write) or ApiKey
Path
location_idintegerrequired

Identifier of the Location. Verified against the credential on every call — a Location the credential cannot access responds with 404.

Bodyapplication/json
datasetsArray of strings, non-empty

Datasets to build, without repeats; omitted — every dataset the acting user may read.

curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/analytics/datasets/prepare' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "datasets": [
      "appointments",
      "visits"
    ]
  }'

Responses

The build status of each ordered dataset.

Headers
RateLimit-Remaininginteger, (int32), >= 0

Requests left in the most constrained policy window that applies to this request.

RateLimit-Resetinteger, (int32), >= 0

On 429, seconds until the most constrained policy frees up; it equals Retry-After there. On a successful response it reports the length of that policy's window rather than the time left in the current one, so treat it as the window size, not as a countdown — the counter to pace against is RateLimit-Remaining.

RateLimit-Policystring

Most constrained policy applied to the request, as <limit>;w=<window in seconds>.

Example:"10;w=60"
X-Request-Idstring

Request identifier for support and log correlation.

Bodyapplication/json
objectstringrequired
Value:"analytics_dataset_preparation"
datasetsArray of objectsrequired
Response
{ "object": "analytics_dataset_preparation", "datasets": [ { … } ] }