Reporting API
The Customer Journey Analytics Reporting API allows you to create and retrieve reports programmatically. These APIs use the same data and methods that Adobe uses inside the product UI. See Reports in the Customer Journey Analytics guide for more information.
This guide includes instructions for using the following endpoints:
- GET top items report: Retrieves top items for a specified dimension
- POST create dataview reports: Creates a report for an existing dataview
data-variant=info
data-slots=text
Get top items report
Use this endpoint to retrieve the top items for a specific dimension. This returns only the top items from the report, according to the maximum number of items you want returned, ranked by the specified metric.
GET https://cja.adobe.io/reports/topItems
Example request
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X GET "https://cja.adobe.io/reports/topItems?limit=5&page=0&lookupNoneValues=true&dataId=dv_554445545&dimension=pages" \
-H "accept: application/json" \
-H "x-api-key: {API_KEY}" \
-H "x-gw-ims-org-id: {ORG_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Example response
data-slots=heading, code
data-repeat=1
data-languages=JSON
Response
{
"totalPages": 1,
"firstPage": true,
"lastPage": true,
"numberOfElements": 5,
"number": 0,
"totalElements": 5,
"columns": {
"dimension": {
"id": "variables/page",
"type": "string"
},
"columnIds": [
"0"
]
},
"rows": [
{
"itemId": "3306266643",
"value": "home",
"data": [
219567
]
},
{
"itemId": "2796092754",
"value": "category 5",
"data": [
90943
]
},
{
"itemId": "1738577623",
"value": "category 2",
"data": [
84192
]
}
],
"summaryData": {
"filteredTotals": [
3080619
],
"totals": [
3080619
]
}
}
Request parameters
The following table describes the request parameters for the GET /reports/topItems endpoint:
dataIddv_554445545.dimensionpages.localeen_US.lookupNoneValuesfalselimitpageResponse parameters
The following table describes the response parameters for the GET /reports/topItems endpoint:
totalPagesfirstPagelastPagenumberOfElementsnumber0totalElementscolumnsdimension datadimensionid and typerowsitemId, value and dataitemIdvalueitemId in the reportdatasummaryDataUsage notes and limitations
Consider the following when working with the Reports API:
Rate limiting
The Reports API enforces rate limits to ensure optimal performance:
- Requests per minute: 60 requests per minute per organization
- Concurrent requests: Maximum 6 concurrent requests per organization
Report execution limits
- Data range: Maximum 18 months of data per request
- Dimension items: Maximum 1000 dimension items per request
- Metrics: Maximum 20 metrics per report
- Execution time: Report execution timeout is 300 seconds
Best practices
- Cache report results when possible to reduce API calls
- Use pagination for large result sets
- Implement retry logic with exponential backoff for rate-limited requests
- Use the
topItemsendpoint for quick dimension analysis without metrics - Use appropriate date ranges to avoid large data requests
For more information on CJA Reports APIs, see the CJA API reference.
Post create dataview reports
Use this endpoint to create report requests and return data for an existing data view. This corresponds to creating a visualization in the CJA Analysis Workspace UI.
POST https://cja.adobe.io/reports
Example request
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X POST "https://cja.adobe.io/reports" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: {API_KEY}" \
-H "x-gw-ims-org-id: {ORG_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-d '{
"rsid": "dv_example_dataview_id",
"globalFilters": [
{
"type": "dateRange",
"dateRange": "2023-07-01T00:00:00.000/2023-08-01T00:00:00.000",
"dateRangeId": "thisMonth"
}
],
"metricContainer": {
"metrics": [
{
"columnId": "0",
"id": "metrics/pageviews"
},
{
"columnId": "1",
"id": "metrics/visits",
"sort": "desc"
},
{
"columnId": "2",
"id": "metrics/visitors"
}
]
},
"dimension": "variables/page",
"settings": {
"countRepeatInstances": true,
"includeAnnotations": true,
"limit": 10,
"page": 0,
"nonesBehavior": "exclude-nones"
},
"statistics": {
"functions": [
"col-max",
"col-min"
]
}
}'
Example response
data-slots=heading, code
data-repeat=1
data-languages=JSON
Response
{
"totalPages": 877,
"firstPage": true,
"lastPage": false,
"numberOfElements": 10,
"number": 0,
"totalElements": 8768,
"columns": {
"dimension": {
"id": "variables/page",
"type": "string"
},
"columnIds": [
"0",
"1",
"2"
]
},
"rows": [
{
"itemId": "3306266643",
"value": "home",
"data": [
219567,
151478,
151478
]
},
{
"itemId": "2796092754",
"value": "category 5",
"data": [
90943,
71248,
71248
]
},
{
"itemId": "1738577623",
"value": "category 2",
"data": [
84192,
69067,
69067
]
}
],
"summaryData": {
"filteredTotals": [
3080619,
357996,
357996
],
"totals": [
3080619,
424407,
424407
],
"col-max": [
219567,
151478,
151478
],
"col-min": [
1,
1,
1
]
}
}
Request parameters
The following table describes the request parameters for the POST /reports endpoint:
rsidglobalFilterstype, dateRange, and dateRangeIdtypedateRangedateRangeIdthisMonthmetricContainermetrics arraymetricscolumnId, id, and sortcolumnId0idmetricsortasc or descdimensionsettingscountRepeatInstancesincludeAnnotationslimitpagenonesBehavior0 if set to exclude-nonesstatisticsfunctions arrayfunctionscol-max and col-minResponse parameters
The following table describes the response parameters for the POST /reports endpoint:
totalPagesfirstPagelastPagenumberOfElementsnumber0totalElementscolumnsdimension datadimensionid and typeidtypedimension ID data typecolumnIdsrowsitemId, value and dataitemIdvalueitemId in the reportdatasummaryDatafilteredTotalstotalscol-maxcol-min