API Reference > Manage Data Marketplace content > Data elements
  

Data elements

A data element is the smallest unit of data that is present in Data Marketplace. A grouping of one or more related data elements forms a data asset.

Create data elements

Use a REST API to create data elements in Data Marketplace.

Endpoint and method

The following table describes the connection properties for the API:
Property
Description
Endpoint
/api/v1/integration/dataAssets/<id>/dataElements
<id>: Required. The system generated unique identifier of the enabled data asset to which you want to add the new data element.
To get the system generated unique identifier of a data asset, open the data asset. The data asset page's URL contains the system generated unique identifier.
For example, in the URL https://{{CDMP_URL}}/dataAsset/8c4c2089-6c7e-4696-a8f6-44f87639d65c?dtn=Table_Profiling_AK_1676302415587&tab=dataElements, the system generated unique identifier is 8c4c2089-6c7e-4696-a8f6-44f87639d65c.
For more information about how you can use an API to get the system generated unique identifier of a data asset, see Retrieve data assets.
Method
POST

Request

The following table describes the parameters that you enter in the body of the API payload:
Parameter
Description
Additional Information
name
Required. Enter a name for the data element.
-
refId
Optional. Enter a reference identifier for the data element.
If you don't specify a reference identifier, Data Marketplace automatically assigns a unique value to the object. The reference identifier that Data Marketplace automatically generates contains a prefix. The Administrator can specify the prefix of the automatically generated reference identifier in Metadata Command Center.
If you want to specify a reference identifier, ensure that you enter a unique value. Ensure that you don't use the prefix value that is configured in Metadata Command Center.
description
Required. Enter a description for the data element.
-
referenceLink
Optional. Enter the uniform resource identifier of the data element in the data source.
-
technicalType
Optional. Enter the type of the data element as defined in the data source.
-
technicalName
Optional. Enter the name of the data element as it appears in the data source.
-
type
Optional. Enter a type for the data element.
-
status
Required. Specify a status for the data element.
Enter one of the following values:
  • - To make the data elements available, enter ENABLED.
  • - To make the data elements unavailable, enter DISABLED.

Example request

The following example shows how you can use an API to create a data element:
{
"items": [
{
"name": "Address",
"refId": "DAET3401",
"description": "Address of the customer",
"referenceLink": "URL://DATA_ASSET",
"technicalType": "string",
"technicalName": "string",
"type": "TEXT",
"status": "ENABLED"
}
]
}

Response

When you pass the API query parameters in the 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 create a data element:
{
"processingTime": 2137,
"objects": [
{
"index": 1,
"id": "d917d035-d9a0-3894-a8cc-16b506c4decd",
"refId": "DAET3401",
"name": "Address"
}
]
}
The following table describes the parameters of each data element that is created:
Parameter
Description
index
The position of the data element in the objects JSON array. This value does not impact how the data element is used by a Data Marketplace user.
id
System generated unique identifier of the data element.
refId
Reference identifier of the data element.
name
Name of the data element.

Retrieve data elements

Use a REST API to retrieve the details of data elements in Data Marketplace.

Endpoint and method

The following table describes the connection properties for the API:
Property
Description
Endpoint
/api/v1/integration/dataAssets/<id>/dataElements
<id>: Required. The system generated unique identifier of the data asset that contains the data element.
To get the system generated unique identifier of a data asset, open the data asset. The data asset page's URL contains the system generated unique identifier.
For example, in the URL https://{{CDMP_URL}}/dataAsset/8c4c2089-6c7e-4696-a8f6-44f87639d65c?dtn=Table_Profiling_AK_1676302415587&tab=dataElements, the system generated unique identifier is 8c4c2089-6c7e-4696-a8f6-44f87639d65c.
For more information about how you can use an API to get the system generated unique identifier of a data asset, see Retrieve data assets.
Method
GET
Note: Before you call this API, consider the following:
For more information, see How to call a Data Marketplace API.

Request

The following table describes the parameters that you enter in the request query:
Parameter
Description
Additional Information
sortByField
Optional. Specify the parameters to sort the search results.
To sort the search results, enter one of the following values:
  • - ID
  • - NAME
  • - STATUS
  • - TECHNICAL_TYPE
  • - TECHNICAL_NAME
  • - TYPE
Default value is MODIFIED_ON.
sort
Optional. Set the sorting order of the search results.
You can sort the search results in the following order:
  • - To sort the search results by ascending order, enter ASC.
  • - To sort the search results by descending order, enter DESC.
Default value is DESC.
offset
Optional. Enter the starting index for the paginated results.
Default value is 0.
limit
Optional. Enter the maximum number of results.
Default value is 50.
Maximum value is 100.
Note: The API has no payload.

Example request

The following example shows how you can use an API to retrieve the data elements of a data asset:
https://{{CDMP_URL}}/api/v1/integration/dataAssets/r517d035-g1a0-6813-v4cd-23e506c4devr/dataElements?sortByField=NAME&sort=DESC

Response

When you pass the API query parameters in the 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 data elements of a data asset:
{
"processingTime": 2137,
"offset": 0,
"limit": 50,
"totalCount": 1,
"objects": [
{
"id": "c317d035-d9a0-3144-a8cc-18v506c4dece",
"refId": "DLM-371",
"name": "Retail outlet list",
"description": "A list of all retail outlets.",
"referenceLink": "URL://AXON",
"technicalType": "string",
"technicalName": "string",
"type": "column",
"status": "ENABLED",
"businessName": "Global Retail Outlets",
"businessDesc": "A list of all retail outlets around the global.",
"createdBy": "7w2uGIARApUgxniNoHHWsJ",
"createdOn": "2022-03-08T17:05:28.208Z",
"modifiedBy": "7w2uGIARApUgxniNoHHWsJ",
"modifiedOn": "2022-03-08T17:09:34.623Z"
}
]
}
The following table describes the parameters of each data element that is retrieved:
Parameter
Description
offset
Starting index for the paginated results.
limit
Maximum number of results.
totalCount
Number of data elements retrieved.
id
System generated unique identifier of the data element.
refId
Reference identifier of the data element.
name
Name of the data element.
description
Description of the data element.
referenceLink
Uniform resource identifier of the location in the data source where the data element is stored.
technicalType
Type of the data element as defined in the data source.
technicalName
Name of the data element as it appears in the data source.
type
Type of the data element.
status
Status of the data element.
  • - ENABLED. The data element is available.
  • - DISABLED. The data element is unavailable.
businessName
Business name of the data element as defined in Data Governance and Catalog.
In Data Governance and Catalog, technical assets might have user-friendly business names assigned to them. Users can assign the business names manually, or the system can automatically assign the names. For more information, see the Enrich technical assets with governance context topic in the Working With Assets help for Data Governance and Catalog.
businessDesc
Business description of the data element as defined in Data Governance and Catalog.
In Data Governance and Catalog. For more information, see the Enrich technical assets with governance context topic in the Working With Assets help for Data Governance and Catalog.
createdBy
System generated unique identifier of the user account that created the data element.
createdOn
Date when the data element was created.
modifiedBy
System generated unique identifier of the latest user account that modified the data element.
modifiedOn
Latest date when the data element was modified.

Modify data elements

Use a REST API to modify data elements in Data Marketplace.

Endpoint and method

The following table describes the connection properties for the API:
Property
Description
Endpoint
/api/v1/integration/dataAssets/<id>/dataElements
<id>: Required. The system generated unique identifier of the data asset whose data element you want to modify.
To get the system generated unique identifier of a data asset, open the data asset. The data asset page's URL contains the system generated unique identifier.
For example, in the URL https://{{CDMP_URL}}/dataAsset/8c4c2089-6c7e-4696-a8f6-44f87639d65c?dtn=Table_Profiling_AK_1676302415587&tab=dataElements, the system generated unique identifier is 8c4c2089-6c7e-4696-a8f6-44f87639d65c.
For more information about how you can use an API to get the system generated unique identifier of a data asset, see Retrieve data assets.
Method
PUT

Request

The following table describes the parameters that you enter in the body of the API payload:
Parameter
Description
Additional Information
id
Required. Enter the system generated unique identifier of the data element that you want to modify.
For more information about how you can use an API to get the system generated unique identifier of a data element, see Retrieve data elements.
name
Required. Enter a name for the data element.
-
refId
Optional. Enter a reference identifier for the data element.
If you don't specify a reference identifier, Data Marketplace automatically assigns a unique value to the object. The reference identifier that Data Marketplace automatically generates contains a prefix. The Administrator can specify the prefix of the automatically generated reference identifier in Metadata Command Center.
If you want to specify a reference identifier, ensure that you enter a unique value. Ensure that you don't use the prefix value that is configured in Metadata Command Center.
description
Required. Enter a description for the data element.
-
referenceLink
Optional. Enter the uniform resource identifier of the data element in the data source.
-
technicalType
Optional. Enter the type of the data element as defined in the data source.
-
technicalName
Optional. Enter the name of the data element as it appears in the data source.
-
type
Optional. Enter a type for the data element.
-
status
Required. Specify a status for the data element.
Enter one of the following values:
  • - To make the data elements available, enter ENABLED.
  • - To make the data elements unavailable, enter DISABLED.

Example request

The following example shows how you can use an API to modify a data element:
{
"items": [
{
"id": "d917d035-d9a0-3894-a8cc-16b506c4decd",
"name": "Updated Address",
"refId": "DAET3401",
"description": "Updated Address of the customer",
"referenceLink": "URL://DATA_ASSET",
"technicalType": "string",
"technicalName": "string",
"type": "TEXT",
"status": "ENABLED"
}
]
}

Response

When you pass the API query parameters in the 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 modify a data element:
{
"processingTime": 1986,
"objects": [
{
"index": 1,
"id": "d917d035-d9a0-3894-a8cc-16b506c4decd",
"refId": "DAET3401",
"name": "Updated Address"
}
]
}
The following table describes the parameters of each data element that is modified:
Parameter
Description
index
The position of the data element in the objects JSON array. This value does not impact how the data element is used by a Data Marketplace user.
id
System generated unique identifier of the data element.
refId
Reference identifier of the data element.
name
Name of the data element.

Delete data elements

Use a REST API to delete data elements in Data Marketplace.

Endpoint and method

The following table describes the connection properties for the API:
Property
Description
Endpoint
/api/v1/integration/dataElements/<id>
<id>: Required. Enter the system generated unique identifier of the data element that you want to delete.
For more information about how you can use an API to get the system generated unique identifier of a data element, see Retrieve data elements.
Method
DELETE

Request

The API has no payload.

Example request

The following example shows how you can use an API to delete a data element:
https://{{CDMP_URL}}/api/v1/integration/dataElements/d2313aed-330e-44a0-bcfa-380ee4a95a62

Response

When you pass the API query parameters in the REST client, the client displays a response for the parameter values that you have entered.
If you see the following response code, it means that the data element is deleted successfully:
204 OK code

Manage the data quality information of a data element

Use a REST API to specify a data quality score for a data element in Data Marketplace or to modify the data quality score of a data element.
For more information about data quality rules, see the Data Quality Per Asset section topic in the Introduction and Getting Started help.

Endpoint and method

The following table lists the connection parameters for the API:
Property
Description
Endpoint
/api/v1/integration/dataElements/dq/records
Method
PUT

Request

The following table describes the parameters that you enter in the body of the API payload:
Parameter
Description
Additional Information
dataElementId
Required. Enter the system generated unique identifier of the data element for which you want to specify a data quality score.
For more information about how you can use an API to get the system generated unique identifier of a data element, see Retrieve data elements.
ruleRefId
Required. Enter the reference identifier of the data quality rule that is run on the data element as defined in the external data quality system.
-
ruleName
Required. Enter the name of the data quality rule that is run on the data element.
-
ruleDescription
Optional. Enter the description of the data quality rule that is run on the data element.
-
type
Required. Specify the dimension for which the data quality rule is run.
Enter one of the following values:
  • - Accuracy
  • - Validity
  • - Completeness
  • - Consistency
  • - Uniqueness
  • - Timeliness
score
Required. Enter the data quality score.
Enter a value from 0 through 100.
rowCount
Required. Enter the number of rows on which the data quality rule is executed.
-
exceptionCount
Required. Enter the acceptable number of unresolved data quality issues in your data.
-
executionDate
Optional. Enter the date when the data quality rule is executed.
-
thresholds
Required. Enter a threshold.
Threshold is the minimum acceptable data quality score of a data element. The thresholds that you define help users to distinguish helpful data from the unhelpful data.
thresholds > name
Required. Enter the name of the color used by Data Marketplace to represent a threshold.
Enter one of the following values:
  • - The GREEN value indicates that the data quality score is above the target value, represents a "Good" score.
  • - The AMBER value indicates that the data quality score is between the threshold and target value, represents an "Acceptable" score.
thresholds > value
Required. Enter the minimum acceptable data quality score.
You must specify a value for both the GREEN and AMBER threshold.

Example request

The following example shows how you can use an API to specify a data quality score for a data element:

{
"items": [
{
"dataElementId": "d917d035-d9a0-3894-a8cc-16b506c4decd",
"ruleRefId": "CDMP-RO-01",
"ruleName": "CDMP Rule Occurrence 1",
"ruleDescription": "Rule Description",
"type": "Accuracy",
"score": 85,
"rowCount": 100,
"exceptionCount": 15,
"executionDate": "2022-12-07T00:00:00.000Z",
"thresholds": [
{
"name": "GREEN",
"value": 88
},
{
"name": "AMBER",
"value": 70
}
]
}
]
}

Response

When you pass the API query parameters in the 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 specify a data quality score for a data element:

{
"processingTime": 689,
"objects": [
{
"index": 1,
"id": "g377d066-f9e4-5674-f7cv-13g666c4dtyd",
"refId": "CDMP-RO-01",
"name": "CDMP Rule Occurrence 1"
}
]
}
The following table contains the parameters in the response body:
Parameter
Description
id
System generated unique identifier of the data quality score information of the data element.
refId
Reference identifier of the data quality rule that is assigned to the data element.
name
Name of the data quality rule that is assigned to the data element.