DRM Rights Service API Specifications (Version 1.0)
Choose a server to use:
Get the data permissions of eligible dp_ids found by DRM Rights Service for the data use case specified in the request body. The ids of request parameters are available to be looked up in DRM CloudSQL mysql server now and DRM UI in the future. NOTE: The fetch API should be called every time for obtaining the latest dpPermissions and a new delivery token for the data use case, previously obtained eligible dp_ids and delivery_token should not be cached on the caller's end to be reused for the multiple data generation of the same data use case.
The fetch request body contains the data use case parameters.
object | object | required | |
productId | string | [Required] Id of the Adara product that uses the data | required |
dataTypes | array[string] | [Required] The ids of data types needed for this data use case. Note that at least one data type needs to be specified, otherwise, a bad request error will occur. | required |
usageTypes | array[string] | [Required] The ids of data usage types involved in this data use case. Note that at least one usage type needs to be specified, otherwise, a bad request error will occur. | required |
drmConsumers | object | A consumer of the output data of this data use case. | required |
drmClients | array[string] | Client consumers of the data | optional |
drmVerticals | array[string] | Vertical consumers of the data | optional |
destinations | array[string] | [Required] The ids of destination platforms where the output data of the data use case will be delivered. Pass an empty list in this field to denote that the output data will be delivered to ALL destination platforms. | required |
dataOrigins | array[string] | [Required] The ids of geographical region(s) where data providers' data is collected from. Pass an empty list in this field to denote that data collected from ALL geographical regions are needed for the data use case. | required |
excludedDpIds | array[integer] | [optional] The data provider ids to be excluded from the data use case prior in advance and regardless of the eligibility. Note this field should not co-exist with expectedDpIds in the request, otherwise, a bad request error will occur. | optional |
fetchForDelivery | boolean | [optional] A flag to indicate whether this fetch request call is driven by an intended data generation and delivery. A delivery_token will be issued and returned in the response if this field is set to true. This field is set to false by default if it's not specified in the request. | optional |
curl --request POST \
--url https://drm-qa.adara.com/drm/rights/v1.0/fetch \
--data '{
"productId": "{string}",
"dataTypes": [
"{array[string]...}"
],
"usageTypes": [
"{array[string]...}"
],
"drmConsumers": {
"drmClients": [
"{array[string]...}"
],
"drmVerticals": [
"{array[string]...}"
]
},
"destinations": [
"{array[string]...}"
],
"dataOrigins": [
"{array[string]...}"
],
"excludedDpIds": [
"{array[integer]...}"
],
"fetchForDelivery": "{boolean}"
}'
object | object | ||
dpPermissions | array[object] | A list of data permission object of the eligible dp_ids to the data use case. | optional |
dpId | integer | The id of the data provider. | optional |
deliveryToken | string | The delivery_token obtained from the preceding Fetch request. It will be used by DRM to retrieve the information provided in the preceding fetch request for validating this data delivery and log the information of the output data for analytics and auditing purpose. | optional |
xxxxxxxxxx
{
"dpPermissions": [
{
"dpId": "{integer}"
}
],
"deliveryToken": "{string}"
}
Check with DRM rights service for getting the data delivery validated and approved before taking action to deliver the data. NOTE: the delivery_token must be paired with the output data generated for the delivery which this delivery_token was issued for. A delivery_token should neither be reused for delivering multiple data snapshots generated across time for the same data use case nor be used for the output data of other data use case.
The request body needs to contain the previously issued delivery_token and the required information.
object | object | required | |
deliveryToken | string | The delivery_token returned along with the dp_ids which are used for generating the output data in this delivery. | required |
outputSize | integer | The size of the output data | required |
xxxxxxxxxx
curl --request POST \
--url https://drm-qa.adara.com/drm/rights/v1.0/validate \
--data '{
"deliveryToken": "{string}",
"outputSize": "{integer}"
}'
object | object | ||
deliveryApproved | boolean | True as the validation is passed and the data delivery is approved. | optional |
xxxxxxxxxx
{
"deliveryApproved": "{boolean}"
}