Edit in GitHubLog an issue

Asset Management

The Customer Journay Analysis (CJA) asset management API provides methods for transferring ownership of CJA assets.

The endpoints described in this guide are routed through cja.adobe.io. To use them, you must first create a client with access to the Adobe Developer Console. For more information, see Getting started with the CJA API.

This guide includes instructions for the following:

  • Retrieving the type and number of CJA assets assigned to a user in a specified organization with the GET user asset count endpoint.
  • Transfering the ownership of those CJA assets to another user with the PUT user asset transfer endpoint, in combination with other API services.

Before using the above endpoints, you can use the Configuration API to find users in your organization and the assets assigned to them.

GET user asset count

Use this endpoint to retrieve both a count of assets owned by a user, and the componentType for each asset. Note that the user is not the admin requesting the counts but the user who owns the CJA asset.

GET https://cja.adobe.io/data/componentmetadata/1.0/ares/users/assets/{ImsUserId}/counts

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.

Copied to your clipboard
curl -X GET "https://cja.adobe.io/data/componentmetadata/1.0/ares/users/assets/exampleImsUserId.e/counts" \
-H "x-api-key: {CLIENT_ID}" \
-H "x-gw-ims-org-id: {IMS_ORG_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"

Request example details

The example above shows a request for the types and numbers of assets owned by userexampleImsUserId.e.

Response example details

The response above shows the number of assets owned by user exampleId, classified by componentType. This user owns 2 assets of type project, 1 of type calculatedMetric, and 2 of type segment.

Request Parameters

The following table describes the GET user asset count request parameters:

NameRequiredTypeDescription
imsUserId
required
string
The ID of the IMS user whose assets are counted

Response Parameters

The following table describes the GET user asset count response parameters:

NameTypeDescription
componentType
string
The type of components counted by the request. This includes project, dateRange, annotation, calculatedMetric, segment, alert, and ScheduledJob.
count
integer
The number of components owned by the user

PUT user asset transfer

Use the PUT user asset transfer endpoint to transfer assets to a specified user.

PUT https://cja.adobe.io/data/componentmetadata/1.0/ares/users/assets/{RECIPIENT_USER_IMS_ID}/transfer

To complete an asset transfer, you will need the following:

  • The reciepientImsUserId: the IMS user ID of the recipieht of the assets, found with the Configuration API.
  • The componentType: the type of component as listed in response to the Get user asset count endpoint.
  • The asset ID: The ID of the asset, as shown in response to the API service that corresponds to the type of asset. For example, if the GET user asset count endpoint shows that exampleUserId owns two project assets, use the Project API to return the asset ID. The asset ID is already associated with the current asset owner.

Project asset transfer example

The steps below show an example for transfering a project asset to another user (using the steps described above), as follows:

  1. The admin retrieves the asset owner user ID and the recipient user ID by using the Configuration API. This shows that the user ID of the owner is OwnerExample111.e and the recipient is RecipientExample222.e.
  2. The admin retrieves the number and type of assets for the owner with the GET user asset count endpoint. This shows two project type assets owned by OwnerImsUserIdExample.
  3. The admin uses the GET projects by user endpoint within the Project API to retrievethe asset ID of the projects to be transferred, as shown in the example request and response below:

Example requests and responses for a project API call

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.

Copied to your clipboard
curl -X PUT "https://cja.adobe.io/data/componentmetadata/1.0/ares/users/projects?locale=en_US&limit=10&page=0&pagination=true&ownerId=OwnerExample111.e\"
-H "x-api-key: {CLIENT_ID}" \
-H "x-gw-ims-org-id: {IMS_ORG_ID}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \

Request example details for project API call

The Projects API example above requests a list of projects under the ownership of OwnerExample111.e

Response example details for project API call

The example Projects API response above shows that the asset IDs for the projects are ExampleProjectId1 and ExampleProjectId2. These project IDs will be used to transfer the assets toRecipientExample222.e with the the PUT user asset transfer.

PUT user assets transfer 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.

Copied to your clipboard
curl -X PUT 'https://cja.adobe.io/data/componentmetadata/1.0/ares/users/assets/RecipientExample222.e/transfer' \
-H 'x-api-key: {CLIENT_ID}' \
-H 'x-gw-ims-org-id: {IMS_ORG_ID}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-d '{
[
{
"componentType": "project",
"componentIds": [
"ExampleProjectId1"
]
}
]
}'

Request example details

The request above shows a request to transfer the project asset ExampleProjectId1 to the recipient RecipientExample222.e.

Response example details

The response above shows a successful response for the asset transfer. You can use the GET user asset count endpoint again to verify the number of assets transferred.

Request Parameters

The following table describes the PUT user asset transfer request parameters:

NameRequiredTypeDescription
recipientImsUserId
required
string
The IMS user ID to receive assets from the transfer
componentType
string
The type of component
componentIds
string
An array of the IDs intended to be transferred

API status codes

For a description of API status codes and tips for troubleshooting, see the Platform FAQ and troubleshooting guide.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.