### Example HTTP GET Request for Projects Endpoint Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects Demonstrates an HTTP GET request to the `/projects` endpoint, illustrating how to retrieve all projects. Although labeled as a cURL example in the source, the provided snippet is a direct HTTP request line. ```HTTP GET https://cja.adobe.io/projects ``` -------------------------------- ### CJA Projects: Example Project Configuration Fragment Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects This JSON snippet illustrates a detailed configuration fragment for a CJA project, encompassing various settings for reportlets, tables, and general project properties. It serves as an example of the complex structure involved in project definitions. ```JSON "autoGenerate": true, "usePercentLimits": false }, "location": "behindNumber", "type": { "anomaly": true, "background": true, "backgroundType": "bar", "comparison": "none", "interpretZeroAsNoValue": false, "number": true, "percent": true, "showGrandTotal": true, "showSparklines": true, "showTotals": true, "wrapHeaderText": true } } }, "freeformTable": { "alignDatesForTimeDimension": true, "attributionSettings": [], "breakdowns": [], "collapsed": false, "columnWidths": [100, 100], "pagination": { "currentPage": 0, "viewBy": 50 }, "search": { "operator": "AND", "rules": [] }, "selectionCoordinates": [], "settings": { "breakdownByPosition": false, "rowBasedPercentages": false, "totalsType": "columnSum" }, "sort": { ``` -------------------------------- ### API Workflow: Project Asset Transfer Example Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/asset-management This example illustrates the step-by-step process for transferring a `project` asset to another user using the CJA APIs. It involves retrieving user IDs, asset counts, and specific project asset IDs before initiating the transfer via the PUT endpoint. ```APIDOC [ "1. The admin retrieves the asset owner user ID (OwnerExample111.e) and the recipient user ID (RecipientExample222.e) using the Configuration API.", "2. The admin retrieves the number and type of assets for the owner with the GET user asset count endpoint, showing two `project` type assets owned by OwnerImsUserIdExample.", "3. The admin uses the GET projects by user endpoint within the Project API to retrieve the asset ID of the projects to be transferred." ] ``` -------------------------------- ### Send GET Request to CJA API with Python Requests Source: https://developer.adobe.com/cja-apis/docs/api/use-cases/python This example demonstrates how to send a GET request to a CJA API endpoint, such as `/aresconfig/users/me`, using the `requests` library in Python. It imports the `requests` module and passes the previously prepared `myHeader` dictionary for authentication. The response is stored in the `res` variable for further processing. ```Python import requests res = requests.get("https://cja.adobe.io/aresconfig/users/me", headers=myHeader) ``` -------------------------------- ### Example JSON Response for Components Shared to User Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/shares This JSON array represents a successful response from the API for retrieving components shared to the user. It contains a list of component IDs (strings) that the authenticated user has access to through sharing. ```json [ "s300006186_5f4eb5bb8aca3c5a990878e8" ] ``` -------------------------------- ### Adobe CJA API: Get Backfills Request Parameters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/connections This section defines the parameters available for the GET backfills API endpoint, specifying whether each parameter is required, its data type, and a brief description of its purpose. It covers both mandatory and optional query parameters. ```APIDOC [ { "name": "connectionId", "required": "required", "type": "string", "description": "The connection ID" }, { "name": "datasetId", "required": "required", "type": "string", "description": "The dataset ID" }, { "name": "includeStatus", "required": "", "type": "string", "description": "The statuses to include in the response. Includes the enums: `inProgress`, `completed`, and `failed`." }, { "name": "limit", "required": "", "type": "integer", "description": "The number of results shown per page" }, { "name": "page", "required": "", "type": "integer", "description": "The page returned. The first page is `0`." }, { "name": "sortDirection", "required": "", "type": "string", "description": "Sorting direction. Includes the enums: `ASC` and `DESC`." }, { "name": "sortProperty", "required": "", "type": "string", "description": "The property to sort by. Default value is `createdDate`." } ] ``` -------------------------------- ### Configure OAuth User Authentication for Adobe APIs Source: https://developer.adobe.com/cja-apis/docs/api/getting-started This method allows users to authenticate with Adobe APIs using their own accounts. It is suitable for applications where user consent is required. Refer to the Adobe Developer Authentication user guide for detailed setup instructions. ```APIDOC Authentication Method: OAuth User Description: Authenticate with the API using your own account. Usage: Primarily for applications requiring user consent. Reference: https://developer.adobe.com/developer-console/docs/guides/authentication/UserAuthentication/ ``` -------------------------------- ### Example JSON Response for Company Tags Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/tags This JSON object provides a paginated list of tags for a company. It includes tag details, pagination information like total elements, total pages, and current page details. ```json { "content": [ { "id": 596, "name": "sales" }, { "id": 597, "name": "marketing" }, { "id": 662, "name": "finance" } ], "numberOfElements": 3, "totalElements": 385, "totalPages": 129, "firstPage": true, "lastPage": false, "sort": null, "size": 3, "number": 0 } ``` -------------------------------- ### Manage CJA Projects API Source: https://developer.adobe.com/cja-apis/docs/api/endpoints Retrieve, update, or create projects in Customer Journey Analytics. This API enables programmatic control over project configurations. ```APIDOC Projects API Reference: - Purpose: Manage projects. - Methods: - GET /projects: Retrieve existing projects. - POST /projects: Create a new project. - PUT /projects/{id}: Update an existing project. ``` -------------------------------- ### JSON: Example Response Body for Segment Validation Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/segments/validate This JSON object provides an example response from the `segments/validate` endpoint. It indicates whether the segment is `valid`, the `validator_version`, and lists arrays of `supported_products`, `supported_schema`, and `supported_features` relevant to the segment's validity. ```JSON { "valid": true, "validator_version": "1.1.11", "supported_products": [ "data_warehouse", "oberon", "discover" ], "supported_schema": [ "schema_data_warehouse", "schema_oberon" ], "supported_features": [ "function_attr", "function_container", "function_streq" ] } ``` -------------------------------- ### CJA API Get Connections Request Parameters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/connections This section outlines the available query parameters for the GET all connections endpoint. These parameters allow users to filter results by dataset or connection IDs, specify sandbox details, control data expansion, and manage pagination and sorting for efficient data retrieval. ```APIDOC [ { "name": "dataSetIds", "required": false, "type": "string", "description": "Comma-delimited list of dataSet IDs to limit the response with" }, { "name": "connectionIds", "required": false, "type": "string", "description": "Comma-delimited list of connection IDs to limit the response with" }, { "name": "sandboxId", "required": false, "type": "string", "description": "Filter by sandbox ID" }, { "name": "sandboxName", "required": false, "type": "string", "description": "Filter by sandbox name" }, { "name": "expansion", "required": false, "type": "string", "description": "Comma-delimited list of additional fields to include on response. Includes the enums: `name`, `description`, `owner`, `isDeleted`, `isDisabled`, `dataSets`, `createdDate`, `modified`, `caseSensitive`, `organization`, `components`, `numDailyEvents`, `externalData`, `backfillEnabled`, `granularBackfills`, `granularStreaming`, `backfillsSummaryConnection`, `backfillsSummaryDataSets`, `dataSetLastIngested`, `sandboxName`, `sandboxId`, `fieldsId`, `floatPrecision`, `dataRetentionMonths`, `validationErrors`, `resolveIdentityNamespace`, and `stitchedDataSets`." }, { "name": "includeType", "required": false, "type": "string", "description": "Additional connections to include" }, { "name": "cached", "required": false, "type": "boolean", "description": "Whether cached results are returned" }, { "name": "locale", "required": false, "type": "string", "description": "The language to use in the response" }, { "name": "limit", "required": false, "type": "integer", "description": "Number of results returned per page" }, { "name": "page", "required": false, "type": "integer", "description": "The page returned. The first page is `0`." }, { "name": "sortDirection", "required": false, "type": "string", "description": "Sorting direction. Includes the enums: `ASC` and `DESC`." }, { "name": "sortProperty", "required": false, "type": "string", "description": "The property to sort by. Included the enums: `modifiedDate` and `id`." } ] ``` -------------------------------- ### JSON Example Response for Component Share Creation Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/shares This JSON snippet illustrates the structure of a successful response when sharing a component, including the share ID, component ID, type, and recipient details. It shows the data returned after a share operation is completed. ```JSON { "shareId": 12345, "componentId": "{COMPONENTID}", "componentType": "{COMPONENTTYPE}", "shareToImsId": "{groupId}", "shareToType": "group" } ``` -------------------------------- ### Example cURL Request to Modify CJA Data View Session Definition Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/dataviews Demonstrates how to use cURL to send a PUT request to modify the `numPeriods` in the `sessionDefinition` of a specific data view. This example includes required authentication headers and the JSON request body. ```curl curl -X PUT "https://cja.adobe.io/data/dataviews/dv_650a049f5d02785bacxxxxxx?expansion=name%2Cmodified" \ -H "x-api-key: {API_KEY}" \ -H "x-gw-ims-org-id: {IMS_ORG_ID}" \ -H "Authorization: Bearer {AUTHORIZATION_TOKEN}"\ -H "Content-Type: application/json" \ -d '{ "sessionDefinition": [ { "numPeriods": 30, "granularity": "MINUTE", "func": "INACTIVITY", "events": [ "string" ] } ] }' ``` -------------------------------- ### Example JSON Response for Delete Tags Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/tags This JSON object represents the response after successfully deleting tags for components. It includes the component IDs and a status indicating success. ```json { "id": "{COMMA_SEPARATED_COMPONENT_IDS}", "status": { "success": true } } ``` -------------------------------- ### GET Annotation API: Expand Results with Parameters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/annotations/parameters This query string allows you to obtain additional information around an annotation by specifying multiple expansion fields separated by commas. It refines the GET annotation API call to include details like name, description, date range, and color, providing a comprehensive view of the annotation data. ```HTTP GET https://cja.adobe.io/annotations?expansion=name,description,dateRange,color ``` ```APIDOC name: The name of the annotation. description: The annotation's description. dateRange: The date range of the annotation. color: An enum representing the annotation's color. Supported values include STANDARD1 through STANDARD9. applyToAllReports: A boolean that determines if the annotation applies to all report suites. scope: An object including the metrics and filters that the annotation uses. createdDate: The date that the annotation was created. modifiedDate: The date that the annotation was last modified. modifiedById: The ID of the user who last modified the annotation. tags: The tags applied to the annotation. shares: The shares applied to the annotation. approved: A boolean that determines if the annotation is approved by an admin. favorite: A boolean that determines if the user has this annotation favorited (starred). usageSummary: An object that shows where this annotation is used. owner: An object showing the ID, name, and login of the user that created the annotation. imsOrgId: The IMS org of the annotation. dataName: The Data View name. dataId: The Data View ID. ``` -------------------------------- ### CJA API: Retrieve Component Tag Example Response Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/tags This JSON snippet illustrates the structure of a successful response when retrieving component tag information from the CJA API. It includes component IDs, names, descriptions, and associated components. ```json [\n {\n "id": 35653,\n "name": "sales",\n "description": "sales department",\n "components": [\n {\n "componentType": "{COMPONENT_TYPE}",\n "componentId": "{COMPONENT_ID}"\n }\n ]\n },\n {\n "id": 35654,\n "name": "finance",\n "description": "finance department",\n "components": [\n {\n "componentType": "{COMPONENT_TYPE}",\n "componentId": "{COMPONENT_ID}"\n }\n ]\n }\n] ``` -------------------------------- ### API Documentation: Projects Endpoint IncludeType Parameter Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects Explains the `includeType` query parameter for the GET multiple `/projects` endpoint, which alters the set of projects included in API responses. By default, only user-owned projects are returned. ```APIDOC { "parameter": "includeType", "type": "URL Query Parameter", "endpoint": "GET multiple /projects", "description": "Alters the set of projects included in API responses. Default includes only user-owned projects.", "possible_values": [ {"value": "all", "description": "Returns all projects linked to this company (admin users only)"}, {"value": "shared", "description": "Returns projects shared with the user"} ] } ``` -------------------------------- ### Retrieve Adobe CJA Data Views using cURL GET Request Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/dataviews This cURL command demonstrates how to fetch a list of data views from the Adobe CJA API. It uses a GET request to the '/data/dataviews' endpoint, specifying expansion parameters for name, owner, organization, and description. Required headers include 'x-api-key', 'x-gw-ims-org-id', and 'Authorization' with a Bearer token. ```curl curl -X GET "https://cja.adobe.io/data/dataviews?expansion=name%2Cowner%2Corganization%2Cdescription&limit=3&page=0" \ -H "x-api-key: {API_KEY}" \ -H "x-gw-ims-org-id: {IMS_ORG_ID}" \ -H "Authorization: Bearer {AUTHORIZATION_TOKEN}" ``` -------------------------------- ### API Reference: GET User Asset Count Response Parameters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/asset-management This section details the parameters returned in the response of the GET user asset count endpoint. It includes "componentType" (string) for the asset category and "count" (integer) for the number of assets owned by the user within that category. ```APIDOC [ { "name": "componentType", "type": "string", "description": "The type of components counted by the request. This includes `project`, `dateRange`, `annotation`, `calculatedMetric`, `segment`, `alert`, and `ScheduledJob`." }, { "name": "count", "type": "integer", "description": "The number of components owned by the user" } ] ``` -------------------------------- ### CJA API: Update Component Tags Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/tags This section provides examples for updating tags associated with components using the CJA API. It includes both the JSON request body and the corresponding cURL command to perform the update operation. ```json [\n {\n "componentType":"project",\n "componentId":"component-id-1",\n "tags":[\n {\n "name":"marketing-1",\n "description":"marketing 1"\n },\n {\n "name":"marketing-2",\n "description":"markerting 2"\n }\n ]\n }\n] ``` ```curl curl -X PUT \n https://cja.adobe.io/componentmetadata/tags/tagitems \n -H 'Accept: application/json' \n -H 'Authorization: Bearer {ACCESSTOKEN}' \n -H 'Content-Type: application/json' \n -H 'x-api-key: {API_KEY}' \n -H 'x-gw-ims-org-id: {IMS_ORG_ID}' \n -d '{REQUESTJSON}' ``` -------------------------------- ### Bash: Get CJA Audit Logs without Filters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/auditlogs Demonstrates how to retrieve audit logs from the CJA API using a GET request with no query parameters. This example shows the basic `curl` command structure, including required authentication headers such as `x-api-key`, `x-gw-ims-org-id`, and `Authorization` with a Bearer token. ```Bash curl -X GET "https://cja.adobe.io/auditlogs/api/v1/auditlogs" \ -H "x-api-key: {CLIENTID}" \ -H "x-gw-ims-org-id: {IMSORG}" \ -H "Authorization: Bearer {ACCESSTOKEN}" ``` -------------------------------- ### Perform Authenticated GET Request to CJA API with cURL Source: https://developer.adobe.com/cja-apis/docs/api/use-cases/curl This cURL command demonstrates how to send an authenticated GET request to the Adobe Customer Journey Analytics API. It requires "x-api-key", "x-gw-ims-org-id", and "authorization" headers for successful authentication. The example retrieves basic user information from the "/aresconfig/users/me" endpoint, returning a JSON object. ```cURL curl -X GET -H "x-api-key: {CLIENT_ID}" -H "x-gw-ims-org-id: {ORGANIZTION_ID}" -H "authorization: Bearer {ACCESS_TOKEN}" "https://cja.adobe.io/aresconfig/users/me" ``` -------------------------------- ### API Documentation: Projects Endpoint Pagination Parameters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects Explains how to paginate responses that return multiple projects using the `page` and `limit` URL query parameters. A maximum page size of 1000 is enforced. ```APIDOC { "description": "Pagination for responses returning multiple projects.", "parameters": [ {"parameter": "limit", "type": "URL Query Parameter", "description": "The size of the desired page. Maximum 1000."}, {"parameter": "page", "type": "URL Query Parameter", "description": "Indicates which page to retrieve."} ] } ``` -------------------------------- ### API Documentation: Projects Endpoint Expansions Parameter Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects Details the `expansion` URL query parameter for the `/projects` endpoint, allowing additional data fields to be populated in response objects. Describes available expansion fields and their purposes. ```APIDOC { "parameter": "expansion", "type": "URL Query Parameter", "description": "Specifies additional data fields to be populated in response objects.", "available_expansions": [ {"field": "ownerFullName", "description": "The name of the owner of the project"}, {"field": "modified", "description": "The date the project was last modified"}, {"field": "tags", "description": "Tags applied to the project"}, {"field": "shares", "description": "Shares applied to the project"}, {"field": "accessLevel", "description": "Access level the current user has to a particular project (Edit/Duplicate/View)"}, {"field": "externalReferences", "description": "Analytics components (Segments, Calculated Metrics, Date Views) used in the project definition"}, {"field": "definition", "description": "The project definition"} ] } ``` -------------------------------- ### cURL Example: Retrieve CJA Metric by ID Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/metrics This cURL command demonstrates how to make a GET request to the CJA Metrics API to retrieve details for a specific metric. It requires placeholders for client ID, IMS organization ID, and access token for authentication. ```curl curl -X GET "https://cja.adobe.io/data/dataviews/dv_64c7cf/metrics/visits" \ -H "x-api-key: {CLIENT_ID}" \ -H "x-gw-ims-org-id: {IMS_ORG_ID}" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### cURL Example: Get Adobe CJA Audit Logs with Filters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/auditlogs This cURL command demonstrates how to retrieve audit logs from the Adobe CJA API. It includes query parameters for filtering by startDate, endDate, action, component, userType, description, and pageSize. Authentication requires x-api-key, x-gw-ims-org-id, and Authorization headers. ```curl curl -X GET "https://cja.adobe.io/auditlogs/api/v1/auditlogs?startDate=2021-08-01T00%3A00%3A00-07&endDate=2021-09-30T00%3A00%3A00-07&action=CREATE&action=EDIT&action=DELETE&component=SCHEDULED_PROJECT&userType=IMS&description=job&pageSize=2" \ -H "x-api-key: {CLIENTID}" \ -H "x-gw-ims-org-id: {IMSORG}" \ -H "Authorization: Bearer {ACCESSTOKEN}" ``` -------------------------------- ### JSON Example: Retrieve Adobe CJA Projects API Response Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects This JSON snippet presents a typical successful response from the Adobe CJA API for listing projects. It shows how 10 projects are returned on the first page, including their unique identifiers, names, ownership details, and creation timestamps. This structure is crucial for parsing project data and handling pagination in client applications. ```JSON { "content": [ { "id": "6091a10005c7706c0acdd751", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-04T19:31:12Z" }, { "id": "6094a7e01936af351300b81b", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-07T02:37:20Z" }, { "id": "6094aa6b318ae31bf7d0a052", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-07T02:48:11Z" }, { "id": "609c001c17d70a6b31694b7b", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-12T16:19:40Z" }, { "id": "609d94557a1bac32bfe822d6", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-13T21:04:21Z" }, { "id": "609d9b7117d70a6b31699d63", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-13T21:34:41Z" }, { "id": "609eb9772ecede2233067197", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-14T17:55:03Z" }, { "id": "60a400cfad861025de7edf25", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-18T18:00:47Z" }, { "id": "60a403292ecede223306ffe3", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-18T18:10:49Z" }, { "id": "60a5777dad861025de7ee116", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-19T20:39:25Z" } ], "totalPages": 1 ``` -------------------------------- ### Retrieve a Single Date Range using CJA APIs Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/dateranges This snippet demonstrates how to retrieve a specific date range by its ID using a GET request. It shows both the example request URL and the expected JSON response structure, including date range properties like ID, name, description, owner, definition, and creation/disabled dates. ```HTTP GET https://cja.adobe.io/dateranges/5a5e294452faff002119a986 ``` ```JSON { "id": "5a5e294452faff002119a986", "name": "Curated Data Range Test", "description": "Curated Data Range Test", "owner": { "id": 622291 }, "definition": "tm/tm+1m", "createDate": null, "disabledDate": null } ``` -------------------------------- ### Example cURL Request to Copy a Data View Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/dataviews This cURL command demonstrates how to make a PUT request to copy an existing data view. It includes necessary headers for API key, IMS organization ID, and authorization token, along with query parameters for expanding the response with specific fields like name, description, owner, and creation date. ```cURL curl -X PUT "https://cja.adobe.io/data/dataviews/copy/dv_650a049f5d02785bacxxxxxx?expansion=name%2Cdescription%2Cowner%2CcreatedDate" \ -H "x-api-key: {API_KEY}" \ -H "x-gw-ims-org-id: {IMS_ORG_ID}" \ -H "Authorization: Bearer {AUTHORIZATION_TOKEN}\" ``` -------------------------------- ### Curl Command to Create or Update Component Share Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/shares This `curl` command demonstrates how to send a PUT request to the `/componentmetadata/shares` endpoint. It includes necessary headers for authentication and content type, such as `Accept`, `Authorization`, `Content-Type`, `x-api-key`, and `x-gw-ims-org-id`. The `{REQUESTJSON}` placeholder should be replaced with the actual JSON request body. ```bash curl -X PUT \ https://cja.adobe.io/componentmetadata/shares \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {ACCESSTOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-api-key: {API_KEY}' \ -H 'x-gw-ims-org-id: {IMS_ORG_ID}' \ -d '{REQUESTJSON}' ``` -------------------------------- ### CJA API Get Metrics for Dataview Endpoint Parameters Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/metrics This section details the request parameters for the GET /data/dataviews/{DATAVIEW_ID}/metrics endpoint. It specifies required and optional parameters, their types, and descriptions, including dataviewId, includeType, locale, and expansion. ```APIDOC { "endpoint": "GET /data/dataviews/{DATAVIEW_ID}/metrics", "parameters": [ { "name": "dataviewId", "required": true, "type": "string", "description": "The ID of the dataview containing the metric" }, { "name": "includeType", "required": false, "type": "array of strings", "description": "A comma-delimited list of include types" }, { "name": "locale", "required": false, "type": "string", "description": "The language to use in the response" }, { "name": "expansion", "required": false, "type": "array of strings", "description": "A comma-delimited list of additional fields to include in the response. For a complete list of these fields see the reference." } ] } ``` -------------------------------- ### Retrieve CJA Dataview Metrics with cURL GET Request Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/metrics This cURL command demonstrates how to make a GET request to the CJA API's /data/dataviews/{DATAVIEW_ID}/metrics endpoint. It requires CLIENT_ID, IMS_ORG_ID, and ACCESS_TOKEN for authentication and retrieves all metrics associated with a specified dataview ID. ```curl curl -X GET "https://cja.adobe.io/data/dataviews/{DATAVIEW_ID}/metrics" \ -H "x-api-key: {CLIENT_ID}" \ -H "x-gw-ims-org-id: {IMS_ORG_ID}" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### List Multiple Adobe CJA Projects Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects This snippet provides an example response for retrieving a paginated list of multiple projects from the Adobe CJA API. It illustrates the structure of the response, including individual project details, pagination metadata, and sorting information. This endpoint is useful for discovering project IDs and overviewing available projects. ```HTTP GET https://cja.adobe.io/projects ``` ```JSON { "content": [ { "created": "2021-05-14T17:55:03Z" }, { "id": "60a400cfad861025de7edf25", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-18T18:00:47Z" }, { "id": "60a403292ecede223306ffe3", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-18T18:10:49Z" }, { "id": "60a5777dad861025de7ee116", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "imsUserId": "0000000000000000000@AdobeID" }, "type": "project", "created": "2021-05-19T20:39:25Z" } ], "totalPages": 10, "totalElements": 94, "number": 0, "numberOfElements": 10, "firstPage": true, "lastPage": false, "sort": [ { "direction": "ASC", "property": "id", "ignoreCase": false, "ascending": true } ], "size": 10 } ``` -------------------------------- ### Adobe CJA Project Definition JSON Schema Example Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/projects This JSON snippet illustrates the complete structure of an Adobe CJA project definition. It includes project-level properties, workspace definitions, panel configurations with date ranges and report suites, and detailed reportlet settings for freeform tables, including column definitions, sorting, pagination, and display options. ```JSON { "project": { "id": "6091a10005c7706c0acdd751", "name": "New Project", "description": "", "dataId": "dv_000000000000000000", "owner": { "id": 622291 }, "type": "project", "definition": { "additionalCuratedComponents": [], "colorScheme": { "id": "default", "label": "", "value": ["#00C0C7", "#5144D3", "#E8871A", "#DA3490", "#9089FA", "#47E26F", "#2780EB", "#6F38B1", "#DFBF03", "#CB6F10", "#268D6C", "#9BEC54", "#5EABFA", "#BE40CC", "#F56BB7", "#FEE02D"] }, "countRepeatInstances": true, "currentWorkspaceIndex": 0, "customColorSchemes": [], "isCurated": false, "version": "31", "viewDensity": "expanded", "workspaces": [{ "id": "3B1FE317-C72A-4983-ABF1-D3BD14A8D511", "name": "", "panels": [{ "annotations": [], "collapsed": false, "dateRange": { "id": "thisMonth", "__entity__": true, "type": "DateRange", "__metaData__": { "name": "This month" } }, "description": "", "id": "C0DACAE8-CCE1-4332-9496-ABDBE80C9C23", "name": "Freeform", "position": { "autoHeight": 374, "autoSize": true, "width": 100, "x": 0, "y": 0 }, "reportSuite": { "id": "dv_000000000000000000", "__entity__": true, "type": "ReportSuite", "__metaData__": { "name": "dv name", "rsid": "dv_000000000000000000" } }, "segmentGroups": [], "subPanels": [{ "collapsed": false, "description": "", "id": "F2AAAA88-E63E-4AB6-9090-3612F378B9F0", "isQuickInsightsSubPanel": false, "linkedSourceId": "", "position": { "autoHeight": 222, "autoSize": true, "width": 100, "x": 0, "y": 0 }, "reportlet": { "advancedMode": false, "advancedSettings": { "rows": [], "tableState": "builder" }, "columnTree": { "_computedValues": [], "dataSettings": { "advancedItemLimit": 5, "advancedItemSearch": { "operator": "AND", "rules": [] } }, "id": "f46df4-2", "name": "", "nodes": [{ "_computedValues": [], "component": { "id": "All_Visits", "__entity__": true, "type": "Segment", "__metaData__": { "name": "All Visits" } }, "dataSettings": { "advancedItemLimit": 5, "advancedItemSearch": { "operator": "AND", "rules": [] } }, "id": "f46df4-4", "name": "All Visits", "nodes": [], "selectionCoordinates": [], "tableCellDisplay": { "conditionalFormattingOpts": { "autoGenerate": true, "usePercentLimits": false }, "location": "behindNumber", "type": { "anomaly": true, "background": true, "backgroundType": "bar", "comparison": "none", "interpretZeroAsNoValue": false, "number": true, "percent": true, "showGrandTotal": true, "showSparklines": true, "showTotals": true, "wrapHeaderText": true } } }], "selectionCoordinates": [], "tableCellDisplay": { "conditionalFormattingOpts": { "autoGenerate": true, "usePercentLimits": false }, "location": "behindNumber", "type": { "anomaly": true, "background": true, "backgroundType": "bar", "comparison": "none", "interpretZeroAsNoValue": false, "number": true, "percent": true, "showGrandTotal": true, "showSparklines": true, "showTotals": true, "wrapHeaderText": true } } }, "freeformTable": { "alignDatesForTimeDimension": true, "attributionSettings": [], "breakdowns": [], "collapsed": false, "columnWidths": [100, 100], "pagination": { "currentPage": 0, "viewBy": 50 }, "search": { "operator": "AND", "rules": [] }, "selectionCoordinates": [], "settings": { "breakdownByPosition": false, "rowBasedPercentages": false, "totalsType": "columnSum" }, "sort": { "asc": false, "columnId": "f46df4-4", "labelColumn": false }, "staticRows": [{ "component": { "id": "metrics/visits", "__entity__": true, "type": "Metric", "__metaData__": { "name": "Visits" } }, "dataSettings": { "advancedItemLimit": 5, "advancedItemSearch": { "operator": "AND", "rules": [] } }, "id": "f46df4-a" }], "statistics": { "functions": [], "ignoreZeros": true } }, "isConfigVisible": true, "type": "FreeformReportlet" }, "swatchColor": "#00C0C7", "type": "genericSubPanel", "visible": true, "visualizationIndex": 1 }], "type": "panel" }] }] }, "created": "2021-05-04T19:31:12Z" } } ``` -------------------------------- ### Get CJA Date Ranges API Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/dateranges This GET request retrieves a list of date ranges accessible to the user. It supports various query parameters to filter, expand, and paginate the results, allowing for flexible data retrieval based on specific criteria. ```APIDOC class DateRangesAPI { /** * @method GET /dateranges * @description Retrieves a list of date ranges the user has access to. * @endpoint https://cja.adobe.io/dateranges * @param {Object} queryParameters - Optional query parameters to filter and paginate results. * @param {string} [queryParameters.filterByIds] - Comma separated list of date range IDs (e.g., "id1,id2"). Returns only date ranges with these IDs. * @param {string} [queryParameters.expansion] - Allows requests for some response fields to be populated that would otherwise not be included (e.g., "ownerFullName,modified,definition,tags,shares"). * @param {string} [queryParameters.includeType] - Alters the set of date ranges that are included in API responses (Possible values: "all", "shared", "templates"). * @param {integer} [queryParameters.limit=100] - Number of results per page. If left null, the default size is 100 (e.g., 10). * @param {integer} [queryParameters.page=0] - Page number. The first page is indexed at 0 (e.g., 0). * @returns {Array} A list of date range objects. */ getDateranges(queryParameters) { // Example usage: // GET https://cja.adobe.io/dateranges?filterByIds=id1,id2&expansion=ownerFullName } } ``` -------------------------------- ### JSON Example: Successful Adobe CJA Data View Deletion Response Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/dataviews Provides an example of a successful JSON response received after a DELETE request to remove a data view in Adobe Customer Journey Analytics, indicating the operation's success. ```json { "result": "success" } ``` -------------------------------- ### CJA Connections API: Get Configuration Settings Endpoint Documentation Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/connections This section provides detailed API documentation for the CJA Connections API endpoint used to retrieve configuration settings. It outlines request parameters, response parameters, and their respective types and descriptions. ```APIDOC Endpoint: GET /data/connections/configurationSettings Request Parameters: - Name: locale Required: No Type: string Description: The language to use in the response. The default value is `en_US`. Response Parameters: - Name: dataSourceTypes Type: container Description: The data source types used by the organization. Contains the `id`, `type`, and `description` parameters. Properties: - Name: id Type: string Description: The ID of the data source - Name: type Type: string Description: The type of data source - Name: description Type: string Description: A description of the data source type ``` -------------------------------- ### Create CJA Component Share with JSON and cURL Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/shares This example demonstrates how to create a share for a component with a group using the CJA Shares API. It includes both the JSON request body structure and a corresponding `curl` command for making the API call. Ensure to replace placeholders like {COMPONENTID}, {groupId}, {ACCESSTOKEN}, {API_KEY}, {IMS_ORG_ID}, and {REQUESTJSON} with actual values. ```JSON { "componentId": "{COMPONENTID}", "componentType": "{COMPONENTTYPE}", "shareToId": "{groupId}", "shareToType": "group" } ``` ```curl curl -X POST \ https://cja.adobe.io/componentmetadata/shares \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {ACCESSTOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-api-key: {API_KEY}' \ -H 'x-gw-ims-org-id: {IMS_ORG_ID}' \ -d '{REQUESTJSON}' ``` -------------------------------- ### Example JSON Response for Component Share Search Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/shares This JSON object represents a successful response from the CJA Component Share Search API. It contains a `content` array detailing the found component shares, including `componentType`, `componentId`, and a list of `shares`. Pagination metadata such as `totalPages`, `totalElements`, and `number` are also included. ```json { "content": [ { "componentType": "segment", "componentId": "s300006186_5f4eb5bb8aca3c5a990878e8", "shares": [ { "shareId": 11684456, "shareToImsId": "{ims_user_id}", "shareToType": "user", "componentType": "segment", "componentId": "s300006186_5f4eb5bb8aca3c5a990878e8", "shareToDisplayName": null } ] } ], "totalPages": 1, "totalElements": 1, "number": 0, "numberOfElements": 1, "firstPage": true, "lastPage": true, "sort": null, "size": 10 } ``` -------------------------------- ### Retrieve Adobe CJA Share by ID with curl GET Request Source: https://developer.adobe.com/cja-apis/docs/api/endpoints/componentmetadata/shares This `curl` command sends a GET request to the CJA Component Metadata API to retrieve details for a specific share using its unique `SHARE_ID`. Authentication is required via `ACCESSTOKEN`, `API_KEY`, and `IMS_ORG_ID` provided in the request headers. ```curl curl -X GET \ https://cja.adobe.io/componentmetadata/shares/{SHARE_ID} \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {ACCESSTOKEN}' \ -H 'Content-Type: application/json' \ -H 'x-api-key: {API_KEY}' \ -H 'x-gw-ims-org-id: {IMS_ORG_ID}' ``` -------------------------------- ### Prepare Python Header for CJA API Requests Source: https://developer.adobe.com/cja-apis/docs/api/use-cases/python This snippet shows how to construct the `myHeader` dictionary required for authenticating requests to the CJA API using Python. It includes the `x-gw-ims-org-id`, `x-api-key`, and `authorization` (Bearer token) keys, which are essential for successful API communication. Ensure you replace the example values with your actual credentials. ```Python myHeader = { "x-gw-ims-org-id" : "EXAMPLE@AdobeOrg", "x-api-key" : "example-client-id", "authorization" : "Bearer example-authorization-value" } ```