API Reference > Part II: Authenticate using JWT > Manage data collections > Retrieve a data collection
  

Retrieve a data collection

Use a REST API to retrieve the details of an individual data collection in Data Marketplace.

Endpoint and method

The following table describes the connection properties for the API:
Property
Description
Endpoint
/api/v2/data-collections/<dataCollectionId>
<dataCollectionId>: Required. Enter the system-generated unique identifier of the data collection for which you want to retrieve the details.
For more information about how you can use an API to get the system-generated unique identifier of a data collection, see Retrieve all data collections.
To get the system-generated unique identifier of a data collection from the Data Marketplace user interface, open the data collection. The data collection page's URL contains the unique identifier.
For example, in the URL https://{{CDMP_URL}}/datacollection/25158afc-3dfb-44ef-8f3e-cec1e171d0f1?dtn=&tab=summary, the unique identifier is 25158afc-3dfb-44ef-8f3e-cec1e171d0f1.
Method
GET
For more information about how you can call an API, see Authenticate using JWT.

Request

The following table describes the parameters that you enter in the request query:
Parameter
Description
Additional Information
segments
Optional. Specify the type of details that you want the API request to return.
Enter one or more of the following values:
  • - all. Returns all the details about the data collection.
  • - category. Returns the details about the category that contains the data collection.
  • - customAttributes. Returns the details about the custom attributes that are configured for the data collection.
  • - deliveryTargets. Returns the details about the delivery targets that are associated with the data collection.
  • - stakeholdership. Returns the type of user and role that are assigned as stakeholder on the data collection.
  • - systemAttributes. Returns the details about the data collection's creation and modification, such as the date when the data collection was created, the latest date when it was modified, and so on.
  • - termsOfUse. Returns the details about the terms of use that are associated with the data collection.
  • - usageContexts. Returns the details about the usage types that are associated with the data collection.
By default, the parameter is assigned no value and the API response includes only the basic information about the data collection such as the name, description and so on.
Note: The API has no payload.

Example request

The following example shows how you can use an API to retrieve the details of a data collection:
https://{{CDMP_URL}}/api/v2/data-collections/2593524d-82f7-4dfd-bc6b-17088c046f9d

Response

When you invoke the API using a REST client, the client displays a response for the parameter values that you have entered.
The following example shows the response of an API call to retrieve the details of a data collection:
{
"id": "2593524d-82f7-4dfd-bc6b-17088c046f9d",
"externalId": "DCL-1",
"name": "Aggregated Sales Data",
"description": "All sales data from around the world aggregated and standardized.",
"status": "UNPUBLISHED",
"assetGroups": [
{
"id": "b93c4539-a93e-440d-a4b4-95d69b8911e6",
"name": "ASIA",
"isInherited": true
}
]
}
The following table describes the parameters of the data collection that is retrieved:
Parameter
Description
externalId
Reference identifier of the data collection.
name
Name of the data collection.
description
Description of the data collection.
status
Status of the data collection. The status indicates whether the data collection is discoverable by Data Users when they search for it.
A data collection can have one of the following statuses:
  • - PUBLISHED. The data collection is discoverable to Data Users.
  • - UNPUBLISHED. The data collection isn't discoverable to Data Users.
assetGroups
Details of the asset group that is assigned to the category that contains the data collection.
assetGroups > id
System-generated identifier of the asset group.
assetGroups > name
Name of the asset group.
assetGroups > isInherited
Indicates whether the asset group is directly assigned to the category or if the asset group is inherited from the category hierarchy.
This parameter can have one of the following values:
  • - true. The asset group is inherited from the category hierarchy.
  • - false. The asset group is directly assigned to the category.