Edit in GitHubLog an issue

Date ranges API

The Analytics 2.0 Date Range APIs allow you to retrieve, update, or create date ranges programmatically through Adobe Developer. These APIs use the same data and methods that Adobe uses inside the product UI.

Retrieve multiple date ranges

See Date range parameters for query strings that you can attach to this API call.

GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dateranges

For example, get a response localized in English, limited to the first page, with three responses per page.

Copied to your clipboard
curl -X GET "https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dateranges?locale=en_US&limit=3&page=0" \
-H "x-api-key: {CLIENTID}" \
-H "Authorization: Bearer {ACCESSTOKEN}"

Retrieve a single date range

If you know the ID of the date range that you want to retrieve, include it as part of the call.

GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dateranges/{ID}

For example, get a date range with ID 839455 and also include its definition.

Copied to your clipboard
curl -X GET "https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dateranges/839455?expansion=definition" \
-H "x-api-key: {CLIENTID}" \
-H "Authorization: Bearer {ACCESSTOKEN}"

Delete a date range

Permanently deletes a date range by ID. The request is similar to retrieving a single date range, but with a DELETE request instead of a GET request.

DELETE https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dateranges/{ID}

Update or change a date range

Overwrite fields in a date range with desired values. Partial updates are supported, meaning that you can send only the parts of the date range that you want updated and the other fields are not changed. If you send an empty string, that field is cleared.

Date range templates cannot be updated. Copy a template to a new date range, then make the changes to the copy.

PUT https://analytics.adobe.io/api/{GLOBALCOMPANYID}/dateranges/{ID}

This API call requires a JSON body. Include the fields that you want to update in the body. For example:

Copied to your clipboard
{
"name": "New name",
"description": "New description",
"definition": "tm/tm+1m"
}

Create a date range

Create a date range. The name cannot be an empty string or null, and is encoded in UTF-8. Adobe recommends clear and concise names so that they render correctly in the product UI.

POST https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/dateranges/

This API call requires a JSON body. Required fields include name and definition. For example:

Copied to your clipboard
{
"name": "Two months ago",
"description": "Description",
"definition": "tm-3m/tm-2m"
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.