Component Migration API
Use the Component Migration APIs to migrate components, including segments, calculated metrics, and date ranges in Analytics to data views in Customer Journey Anaytics. You can also migrate dimensions and metrics to CJA data views if you have already mapped them with the Dimensions mappings APIs or Metrics mappings APIs.
Component Migration services
Component Migration APIs consist of three services for migrating components from Adobe Analytics to Customer Journey Analytics:
- Component Migration APIs
- Dimensions Mappings APIs
- Metrics Mappings APIs
If you plan to migrate Analytics dimensions or metrics, you must first map them with the Dimensions Mappings API or the Metrics Mappings API and then use the Component Migration APIs described in this guide to finalize the migration. This allows the dimensions or metrics to be migrated into an XDM schema within a CJA data view. For other components, you can use the Component Migration APIs described in this guide directly to migrate them. For more inforation, see the Component Migration overview.
Before using the Component Migration APIs, create a profile named Component Migration in the Adobe Admin Console (admin permissions required). Add Component Migration and Analysis Workspace access permissions to the profile. Also, make sure to auto-include all report suites to the profile. For complete information, see the admin instructions for preparing to migrate your components and projects from Adobe Analytics to Customer Journey Analytics.
The endpoints described in this guide are routed through analytics.adobe.io. To use them, you must first create a client with access to the Adobe Developer Console. Create a new project in the console and add Adobe Analytics APIs. Make sure to select the Component Migration profile you created when preparing your components for migration, as described above. For more information, see Getting started with the Analytics API.
The two migration endpoints below provide methods for migrating project components from Adobe Analytics to Customer Journey Analytics. This includes segments, calculated metrics, and date ranges in Analysis Workspace. It also includes dimensions and metrics if you have mapped them before using these two Migration APIs. If you plan to also migrate dimensions and metrics, use the mappings APIs first so that the project ID can be associated with those mappings when you migrate the project. To use the following two migration endpoints, you will need the Adobe Analytics project ID and report suite ID, as well as the Customer Journey Analytics data view ID.
- POST migrate project: Creates a migration project
- GET migration project summary: Retrieves migration summary for a project
- GET bulk migration projects status: Retrieves status of multiple migration projects
data-variant=info
data-slots=text
POST migrate projects
Use this endpoint to migrate component projects from Adobe Analytics to Customer Journey Analytics. You will need the Analytics Project ID to make this call. If you are migrating Analytics dimensions or metrics, first map them to CJA with the mapping APIs.
POST https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/cjamigration/projects/{projectId}/migrate
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 'POST' \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/cjamigration/projects/{projectId}/migrate" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"aaId": "exampleproject",
"globalCompanyId": "example-analytics-org",
"imsOrgId": "cja-exampleowner-org",
"imsUserId": "cja-exampleowner-id",
"imsUserName": "cja-exampleowner-name",
"rsidDataIdMap": {
"examplersid1": "dataview-id1",
"examplersid2": "dataview-id2"
}
}'
Response
{
"result": "success",
"method": "POST",
"message": "Components migrated successfully"
}
Request example details
The example request above shows the following details:
- The Adobe Analytics project ID (
aaId) isexampleproject.This is the project that contains the components to be transferred from Analytics to CJA.
data-variant=info
data-slots=text
aaId parameter, as shown in the JSON example request above, has different meanings, depending upon endpoint or API service. In a request body for these Component Migration APIs, it is the project ID that is required for a successful call. In the related dimension mapping or metric mapping services, aaId is a label with a different meaning and a different function. For more information on the difference, see the description for aaId in dimensions mappings or metrics mappings services.- The
globalCompanyIdisexample-analytics-org. This is the organization that has ownership of the Analtyics project identified in the project ID. - The
imsOrgId,imsUserId, andimsUserNameall apply to theexampleownerof the CJA data view where the components are to be transferred. - The
rsidDataIdMapobject contains object members that map the Analytics report suite to the CJA dataview. This includes the Analytics report suiteexamplersid1mapped to the CJA data viewdataview-id1. You can add as many pairs as necessary to the object to map the report suites to the data views, as indicated by the next line mappingexamplersid2todataview-id2. ThersidDataIdMapobject is optional but including it can improve migration precision.
Request Parameters
The following table describes the migrate components request parameters:
aaId or projectIdglobalCompanyIdimsOrgIdimsUserIdimsUserNamersidDataIdMap{REPORT_SUITE_ID}: {DATA_VIEW_ID}. The parameter additionalProp1 is shown as the first mapping in the object. Additional mappings can also be added in subsequent lines, as indicated by the parameters additionalProp2 and additionalProp3.Response Parameters
The following table describes the response parameters:
resultmethodmessageGET migration project summary
Use this endpoint to retrieve the migration summary for a single project.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/cjamigration/projects/{projectId}/summary
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://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/cjamigration/projects/{projectId}/summary" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"result": "success",
"method": "GET",
"message": "Migration summary retrieved successfully",
"summary": {
"totalComponents": 10,
"migratedComponents": 8,
"failedComponents": 2
}
}
Request Parameters
The request parameters are the same as those shown above in POST migrate projects endpoint.
Response Parameters
The following table describes the GET migration project summary response parameters:
resultmethodmessagesummarytotalComponentsmigratedComponentsfailedComponentsGET bulk migration projects status
Use this endpoint to retrieve migration statuses for multiple projects.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/cjamigration/projects/{projectId}/summary
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://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/cjamigration/projects/bulk/status" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"cjaId": "string",
"aaId": "string",
"migrationStatus": "STARTED",
"migratedTime": "YYYY-08-24T14:15:22Z",
"type": "string",
"globalCompanyId": "string",
"imsOrgId": "string"
}
Request Parameters
The request parameters are the same as those shown above in POST projects migrate endpoint.
Response Parameters
The following table describes the GET migration projects bulk status response parameters not previously described above:
migrationStatusSTARTED, COMPLETED, or FAILED.migratedTimeStatus codes
Each API request returns an HTTP status code that reflects the result, as follows: