Dimensions API
The CJA Dimensions APIs allow you to retrieve dimensions programmatically through Adobe Developer. These APIs use the same data and methods that Adobe uses inside the product UI. See Dimensions in the Customer Journey Analytics guide for more information.
The endpoints described in this guide are routed through analytics.adobe.io. To use them, you will need to first create a client with access to Customer Journey Analytics APIs. For more information, refer to Getting started with the Customer Journey Analytics API.
data-variant=info
data-slots=text
This guide includes instructions for using the following endpoints:
- GET multiple dimensions: Retrieves a list of metrics for a specified dataview ID
- GET a single dimension: Retrieves information for a single metric from a dataview
Retrieve multiple dimensions
Use this endpoint to retrieve a list of dimensions for a specified dataview ID
GET https://cja.adobe.io/data/dataviews/{dataviewId}/dimensions
Request and response examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X GET "https://cja.adobe.io/data/dataviews/{DATAVIEW_ID}/dimensions?includeType=shared" \
-H "x-api-key: {CLIENT_ID}" \
-H "x-gw-ims-org-id: {IMS_ORG_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"content": [
{
"id": "variables/daterangeweek",
"name": "Week"
},
{
"id": "variables/daterangemonth",
"name": "Month"
},
{
"id": "variables/daterangefifteenminute",
"name": "15 Minute"
},
{
"id": "variables/daterangehour",
"name": "Hour"
},
{
"id": "variables/daterangeyear",
"name": "Year"
},
{
"id": "variables/daterangeday",
"name": "Day"
}
],
"totalElements": 6,
"totalPages": 1,
"number": 0,
"numberOfElements": 6,
"firstPage": true,
"lastPage": true,
"sort": null,
"size": 6
}
Request example details
The above example request shows a request that includes a required dataviewId in the path. It also includes a query parameter for includeType values that are shared.
Response example details
The above example shows the ID and name of six dimensions for a specified dataview.
Request parameters
The GET multiple dimensions endpoints includes one request path parameter (dataviewId) and three optional query parameters, as shown below:
dataviewIdincludeTypelocaleexpansionResponse parameters
The Retrieve multiple dimensions endpoint includes the following response parameters:
idnamedescriptionsourceFieldIdsourceFieldNamestorageIddataSetIdsdataSetTypeenum dataset types: EVENT, LOOKUP, or PROFILEschemaTypesourceFieldTypetableNametypeenum of one of the following: string, boolean, int, decimal, currency, percent, time, enum, and ordered_enum.requiredhideFromReportingschemaPathhasDatasegmentablefavoriteapprovedtagsproperty objects that contain data associated with the dimension. For example, property1, property2, etc. each contain data in key-value pairs for the dimension.sharesproperty objects that contain data associated with the dimension. For example, property1, property2, etc. each contain data in key-value pairs for the dimension.usageSummaryproperty objects that contain data associated with the dimension. For example, property1, property2, etc. each contain data in key-value pairs for the dimension.notFoundhiddenfromGlobalLookupmultiValuedincludeExcludeSettingcaseSensitive, match, type, rules and enabled. These settings are described in the following rows.caseSensitiveincludeExcludeSetting response object.matchand, or or (both type enum). This is contained in the includeExcludeSetting response object.typestring, numeric or date (all type enum). This is contained in the includeExcludeSetting response object.rulesstring and value (both type string). This is contained in the includeExcludeSetting response object.enabledincludeExcludeSetting response object.fieldDefinitionfunc, id, field, label, branches, oberon-storage-type, oberon-table, oberon-field, oberon-storage-id, case-sensitive, and mapped-type. These definitions are described in the following rows.funcraw_field, match or floor (all type enum). This is contained in the fieldDefinition response object.idfieldDefinition response object.fieldfieldDefinition. This is contained in the fieldDefinition response object.labelfieldDefinition response object.branchespred and map-to. This is contained in the fieldDefinition response object. For the complete data model on pred objects and parameters, see the CJA Dimensions API reference.oberon-storage-typefieldDefinition response object.oberon-tablefieldDefinition response object.oberon-fieldfieldDefinition response object.oberon-storage-idfieldDefinition response object.case-sensitivefieldDefinition is case-sensitive. This is contained in the fieldDefinition response object.mapped-typefieldDefinition response object.bucketingSettingbucketSetting and enabled. For the complete data model on these settings, see the CJA Dimensions API reference.noValueOptionsSettingoption and valuedefaultDimensionSortpersistenceSettingenabled, allocationModel, and lookback. For the complete data model on these settings, see the CJA Dimensions API reference.isDeletedRetrieve a single dimension
You can retrieve details of a single dimension if you know the dimension ID. You can find the dimension ID by using the multiple dimensions endpoint.
Use this endpoint to retrieve a single dimension.
GET https://cja.adobe.io/data/dataviews/{DATAVIEW_ID}/dimensions/{dimensionId}
Request and response examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X GET "https://cja.adobe.io/data/dataviews/62437d/dimesions/variables/daterangeyear" \
-H "x-api-key: {CLIENTID}" \
-H "x-gw-ims-org-id: {IMS_ORG_ID}" \
-H "Authorization: Bearer {ACCESSTOKEN}"
Response
{
"id": "string",
"name": "string",
"description": "string",
"sourceFieldId": "string",
"sourceFieldName": "string",
"storageId": "string",
"dataSetIds": [
"string"
],
"dataSetType": "EVENT",
"schemaType": "string",
"sourceFieldType": "string",
"tableName": "string",
"type": "STRING",
"required": true,
"hideFromReporting": true,
"schemaPath": "string",
"hasData": true,
"segmentable": true,
"favorite": true,
"approved": true,
"tags": [
{
"property1": {},
"property2": {}
}
],
"shares": [
{
"property1": {},
"property2": {}
}
],
"usageSummary": {
"property1": {},
"property2": {}
},
"notFound": true,
"hidden": true,
"fromGlobalLookup": true,
"multiValued": true,
"includeExcludeSetting": {
"caseSensitive": true,
"match": "and",
"type": "string",
"rules": [
{
"clause": "string",
"value": "string"
}
],
"enabled": true
},
"fieldDefinition": [
{
"func": "RAW_FIELD",
"id": "string",
"field": "string",
"label": "string",
"branches": [
{
"pred": {
"func": "AND",
"preds": [
{}
],
"pred": {},
"val": {}
},
"map-to": {}
}
],
"oberon-storage-type": "string",
"oberon-table": "string",
"oberon-field": "string",
"oberon-storage-id": "string",
"case-sensitive": true,
"mapped-type": "string"
}
],
"bucketingSetting": {
"bucketSettings": [
{
"from": 0,
"to": 0
}
],
"enabled": true
},
"noValueOptionsSetting": {
"option": "string",
"value": "string"
},
"defaultDimensionSort": true,
"persistenceSetting": {
"enabled": true,
"allocationModel": {
"func": "ALLOCATION_FIRST_TOUCH",
"expiration": {
"func": "afterEvents",
"events": [
"string"
],
"granularity": "string",
"numPeriods": 0,
"context": "string"
},
"lookbackExpiration": {
"func": "string",
"granularity": "string",
"numPeriods": 0
},
"merchandising": {
"func": "nonMerchandising",
"bindingCriteria": {
"func": "always",
"bindingEvents": [
"string"
]
}
},
"context": "string",
"firstWeight": 0,
"middleWeight": 0,
"lastWeight": 0,
"halfLifeNumPeriods": 0,
"halfLifeGranularity": "string"
},
"lookback": {
"func": "string",
"granularity": "string",
"numPeriods": 0
}
},
"isDeleted": true
}
Request example details
The above example shows a request for information associated with the daterangeyear dimension in the 62437d dataview.
Request parameters
The required request parameters for retrieving a single dimension should be specified in the path. The optional parameters should be specified as query parameters.
dataviewIddimensionIdlocaleexpansionResponse parameters
The response parameters for retrieving a single dimension are the same as for retrieving multiple dimensions. See the table above for a description of each parameter.
API status codes
For a description of API status codes and tips for troubleshooting, see the Platform FAQ and troubleshooting guide.