Edit in GitHubLog an issue

Shares API

The Analytics 2.0 Shares APIs allow you to retrieve, update, or create associations with components programmatically through Adobe Developer. The APIs use the same data and methods that Adobe uses in the product UI.

Retrieve multiple shares

Retrieve a list of shares that the user can access.

GET https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares

You can paginate results by using the limit and page query strings.

  • limit: An integer that represents the number of results per page.
  • page: An integer that represents which page to return results.

For example, use the page and limit query strings to only retrieve the first 3 shares in a company:

Copied to your clipboard
curl -X GET "https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares?page=0&limit=3" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESSTOKEN}' \
-H 'x-api-key: {CLIENTID}' \

Retrieve a single share by ID

Returns information around a single share if you know the share ID.

GET https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/{ID}

For example, return information around the share with ID 11684455:

Copied to your clipboard
curl -X GET "https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/11684455" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESSTOKEN}' \
-H 'x-api-key: {CLIENTID}'

Retrieve shares for multiple components

Finds one or more shares with desired values.

POST https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/component/search

This API call requires a JSON request body to determine search criteria. For example:

Copied to your clipboard
{
"componentType": "segment",
"componentIds": [
"example-component-1"
]
}

This API call sends a JSON request body with search criteria. Adobe returns the first three shares that involve the segment with ID 92845.

Copied to your clipboard
curl -X POST "https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/component/search?page=0&limit=3" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESSTOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {CLIENTID}' \
-d '{"componentType": "segment","componentIds": ["92845"]}'

Retrieve components shared to current user

Returns an array of all components of a type shared to the user making the API call.

GET https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/sharedto/me?componentType={COMPONENT_TYPE}

This API call requires the componentType query string. Valid values include:

  • dashboard
  • bookmark
  • calculatedMetric
  • project
  • dateRange
  • metric
  • dimension
  • virtualReportSuite
  • scheduledJob
  • alert
  • classificationSet

For example, get all calculated metrics shared with me:

Copied to your clipboard
curl -X GET "https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/sharedto/me?componentType=calculatedMetric" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESSTOKEN}' \
-H 'x-api-key: {CLIENTID}'

Create a share

Shares a component with a group.

POST https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares

This API call requires a JSON body that determines what component to share and who to share it with. For example:

Copied to your clipboard
{
"componentId": "{COMPONENTID}",
"componentType": "{COMPONENTTYPE}",
"shareToId": "{groupId}",
"shareToType": "group"
}

For example, share a segment with ID 83045 to a group with ID 38951:

Copied to your clipboard
curl -X POST "https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESSTOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {CLIENTID}' \
-d '{"componentId": "83045",
"componentType": "segment",
"shareToId": 38951,
"shareToType": "group"}'

Delete a share

Removes a share from a component.

DELETE https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/{ID}

For example, deletes a share with ID 11439.

Copied to your clipboard
curl -X DELETE "https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares/11439" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESSTOKEN}' \
-H 'x-api-key: {CLIENTID}'

Update shares for components

Set the shares for one or more components. This endpoint overwrites all existing shares for the component, meaning that existing shares are removed.

PUT https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares

This API call requires a JSON request body that contains the components to update and the tags to set. For example:

Copied to your clipboard
[
{
"componentType": "{COMPONENT_TYPE}",
"componentId": "{ID}",
"shares": [
{
"shareId": 11684456,
"shareToId": 622291,
"shareToType": "user",
"componentType": "{COMPONENT_TYPE}",
"componentId": "{ID}",
"shareToDisplayName": null
}
]
}
]

For example, creates a share to segment with ID 48372 to user with ID 622291. If there are any existing shares associated with this segment, those shares are lost.

Copied to your clipboard
curl -X PUT "https://analytics.adobe.io/api/{GLOBALCOMPANYID}/componentmetadata/shares" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {ACCESSTOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {CLIENTID}' \
-d '[{"componentType": "segment",
"componentId": "48372",
"shares": [{
"shareId": 11684456,
"shareToId": 622291,
"shareToType": "user",
"componentType": "segment",
"componentId": "48372",
"shareToDisplayName": null
}]}]'
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.