Introduction
Data Product Hub provides a lightweight end-to-end experience for onboarding, searching, accessing, and delivering stable and discoverable data products across your organization. By publishing data products on the Data Product Hub, teams can work faster and more efficiently. Data producers publish data products for use by the community. Data consumers access the data products for help with business decisions.
Endpoint URLs
The Data Product Hub API uses the following global endpoint URL for all regions. When you call the API, add the path for each method to form the complete API endpoint for your requests.
Replace {access_token}
, {request_method}
, and {method_endpoint}
in this example with the values for your particular API call.
API endpoint
https://{cpd_cluster_host}
Example request
curl -H "Authorization: Bearer {access_token}" -X {request_method} "https://{cpd_cluster_host}/{method_endpoint}"
Authentication
A bearer token from IBM Cloud Pak for Data is required to use any of the Data Product Hub APIs.
Visit the authorization section on Cloud Pak for Data for more information.
Curl command with API key to retrieve token
curl -k -X POST https://{cpd_cluster_host}/icp4d-api/v1/authorize -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{"username":"admin","password":"password"}'
Response
{
"_messageCode_": "200",
"message": "Success",
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...."
}
Use the value of the token
property for your Data Product Hub API calls. Set the token
value as the authorization header parameter for requests to the Data Product Hub APIs. The format is Authorization: Bearer <token>
. For example: Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9....
Error handling
The Data Product Hub API uses standard HTTP response codes to indicate whether a method completed successfully. A 200
response indicates success. A 400
type response indicates a failure, and a 500
type response indicates an internal system error.
HTTP Error Code | Description | Recovery |
---|---|---|
200 |
Success | The request was successful. |
201 |
Created | The request was successful and led to a resource creation. |
202 |
Accepted | The request was successful and accepted for processing, but the processing has not been completed. |
400 |
Bad Request | The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request. |
401 |
Unauthorized | You are not authorized to make this request. |
403 |
Forbidden | The supplied authentication is not authorized to access '{namespace}'. |
404 |
Not Found | The requested resource could not be found. |
408 |
Request Timeout | The connection to the server timed out. Wait a few minutes, then try again. |
409 |
Conflict | The entity is already in the requested state. |
500 |
Internal Server Error | offering_name is currently unavailable. Your request could not be processed. Wait a few minutes and try again. |
Related Methods
The Data Product Hub API provides a set of methods for creating and working with data products.
To use the Data Product Hub APIs, you might need the Watson Data APIs.
Data Product Hub catalog
Each Data Product Hub has a default catalog that contains the data products and associated assets.
To retrieve the Data Product Hub catalog, use the Get Catalog method to retrieve the catalog with the ibm-default-hub
ID.
Get the Data Product Hub catalog
GET /v2/catalogs/ibm-default-hub
Sample response
{
"metadata": {
"guid": "eada118a-8ebb-4688-b30d-303f019b9079",
"url": "https://{cpd_cluster_host}/v2/catalogs/eada118a-8ebb-4688-b30d-303f019b9079",
"creator_id": "10003xxxxx",
"create_time": "2023-06-21T23:59:18Z",
"update_time": "2023-10-06T04:55:09Z"
},
"entity": {
"name": "Default Data Product Catalog",
"description": "Default catalog for IBM Data Product Hub",
"generator": "sampleuser",
"bss_account_id": "999",
"capacity_limit": 0,
"is_governed": false,
"auto_profiling": false,
"uid": "ibm-default-hub",
"subtype": "ibm_data_product_catalog"
},
"href": "https://https://{cpd_cluster_host}/v2/catalogs/eada118a-8ebb-4688-b30d-303f019b9079"
}
More information https://cloud.ibm.com/apidocs/watson-data-api-cpd#retrievecatalogv2
Data product domains
All data products must be associated with a business domain. The business domain facilitates easier discovery by consumers, and helps consumers to better understand the contents of a data product.
Domains are represented as system assets in the Data Product Hub catalog.
Primary business domains have a level1
tag, while sub-domains have a level2
tag.
To list domains, use the Asset Type Search method
{: middle}
Data products include one or more parts. These parts represent assets that can be delivered to consumers of the data product.
For example, a data product might contain:
- One or more
data_asset
parts containing structured or unstructured data that can be downloaded by a data consumer - One or more
ibm_url_definition
parts containing a URL to any data-related hosted artifact that can be opened and used by a data consumer
Each part of a data product must be manufactured before it can be included in a data product. This can be done using the Create Asset method.
For connected data assets, see Connections and Creating a Data Asset for additional information.
For security purposes, assets can only be included in a data product when:
- The asset is public (
rov.mode: 0
). Asset metadata must be public to allow data consumers to discover and understand the contents of a data product. - For connected data assets, the connection is private (
rov.mode: 16
). Connection must be private to prevent data consumers from accessing the data directly. Controlled delivery of data to consumers is facilitated through delivery of the data product.
For each data product part, one or more delivery methods must also be specified. Delivery methods describe how data will be delivered to consumers who order the data product. Delivery methods are represented as system assets in the Data Product Hub catalog.
To list domains, use the Asset Type Search method
List domains
POST /v2/asset_types/ibm_data_product_domain/search?catalog_id={catalog_guid}
Example request to list all domains
{
"query": "*:*"
}
Example request to list all top-level domains
{
"query": "asset.tags:level1"
}
More information https://cloud.ibm.com/apidocs/watson-data-api-cpd#searchnewassetv2
List delivery methods
POST /v2/asset_types/ibm_data_product_delivery_method/search?catalog_id={catalog_guid}
Example request to list all domains
{
"query": "*:*"
}
More information https://cloud.ibm.com/apidocs/watson-data-api-cpd#searchnewassetv2
Searching for data products
Search for data products using the Global Search method. Using this method, you can create flexible, advanced queries on indexed fields of a data product.
Data Products indexed in global search have artifact_type = ibm_data_product_version
, with the following structure:
{
"tenant_id": "string",
"artifact_id": "string",
"last_updated_at": 0,
"metadata": {
"name": "string",
"description": "string",
"artifact_type": "ibm_data_product_version",
"tags": ["string"],
"modified_on": "date",
"modified_by": "string",
},
"entity": {
"data_product_version": {
"product_id": "string",
"version": "string",
"state": "string",
"domain": "string",
"domain_id": "string"
}
}
}
Search in a Data Product Hub catalog
POST /v3/search?auth_scope=ibm_data_product_catalog&auth_cache=true
Example search for available data products matching a search string
{
"query": {
"bool": {
"must": [
{
"gs_user_query": {
"search_string": "my search string",
"nlq_analyzer_enabled": true
}
}
],
"filter": [
{
"term": {
"entity.data_product_version.state": "available"
}
}
]
}
}
}
Data product orders
To place an order of a data product, use the Create Asset List method to create an asset list with type = order
.
Placing an order automatically implies acceptance of the data contract terms for the data product version being ordered.
Order List Item | Description | Required Input Properties | Output Properties |
---|---|---|---|
Data Product Version | Specifies the asset representing the data product version that is being ordered. Put this item in the top level asset of the order. |
|
|
Data Product Part(s) | For each part of the data product, specifies the asset representing the data product part along with the selected delivery method. Put these items in the items of the order. |
|
|
Delivery of data product orders is asynchronous. The order can be tracked using the id
of the asset list representing the data product order.
Depending on the delivery method, the delivery process may generate one or more assets as output.
To check the status of an order or to get the IDs of the generated output assets, use the Get Asset List Items method.
The delivery status of each item in the order is returned in properties.data_product_delivery_state
.
For items that have been successfully delivered, any generated assets are returned in properties.assets_out
.
To retrieve an output asset from an order, use the Get Asset method.
Create an asset list for the order
POST /v2/asset_lists
Example order for a data product containing two parts
{
"name": "Sample Data Product Order",
"description": "This is an example data product order",
"type": "order",
"state": "received",
"asset": {
"asset": {
"metadata": {
"id": "6768e6c4-800b-4edc-94fc-86da210175d9",
"type": "ibm_data_product_version",
"container": {
"id": "eada118a-8ebb-4688-b30d-303f019b9079",
"type": "catalog"
}
}
}
},
"items": [
{
"asset": {
"metadata": {
"id": "87469e5f-4b02-43d5-8f12-386cff8dc970",
"type": "data_asset",
"container": {
"id": "eada118a-8ebb-4688-b30d-303f019b9079",
"type": "catalog"
}
}
},
"properties": {
"data_product_id": "a6f0de47-eb41-4504-a67a-d295a1227056",
"delivery_method": {
"asset_id": "1bc501fe-09cb-4fb8-ba7d-abc6e134894e",
"catalog_id": "eada118a-8ebb-4688-b30d-303f019b9079"
}
}
}
]
}
More information https://cloud.ibm.com/apidocs/watson-data-api-cpd#create-asset-list
Get order status
GET /v2/asset_lists/{id}/items
Example order status
{
"items": [
{
"id": "48683ee2-3fcd-4ea2-a7e1-e55b2858d1a3",
"access_control": {
"owner": "10003xxxxx"
},
"created_at": "2023-10-06T19:53:44Z",
"last_updated_at": "2023-10-06T20:06:43Z",
"last_updated_by": "10003xxxxx",
"asset": {
"metadata": {
"id": "87469e5f-4b02-43d5-8f12-386cff8dc970",
"type": "data_asset",
"container": {
"id": "eada118a-8ebb-4688-b30d-303f019b9079",
"type": "catalog"
}
}
},
"properties": {
"data_product_id": "a6f0de47-eb41-4504-a67a-d295a1227056",
"delivery_method": {
"asset_id": "1bc501fe-09cb-4fb8-ba7d-abc6e134894e",
"catalog_id": "eada118a-8ebb-4688-b30d-303f019b9079"
},
"data_product_delivery_state": "delivered",
"data_product_delivery_state_modified": "1696622803073",
"assets_out": [
{
"catalog_id": "eada118a-8ebb-4688-b30d-303f019b9079",
"asset_id": "814a4735-e120-4b30-afe7-c755a8723c52"
}
]
}
}
],
"limit": 200,
"total_count": 1,
"first": {
"href": "https://https://{cpd_cluster_host}/v2/asset_lists/387ea8a3-aeae-4556-8619-9329efbe8cf0/items"
},
"next": {
"start": "g1AAAACdeJzLYWBgYMpgTmHQTElKzi9KdUhJMtJLytVNTtYtLdYtzi8tydA1stBLzskvTUnMK9HLSy3JAWlJZEji____f1YGk5uDgtFUBaBYojiqOWbEmJPHAiQZPgCp_3DjhFeAxBLFsgC40DAN",
"href": "https://https://{cpd_cluster_host}/v2/asset_lists/387ea8a3-aeae-4556-8619-9329efbe8cf0/items?start=g1AAAACdeJzLYWBgYMpgTmHQTElKzi9KdUhJMtJLytVNTtYtLdYtzi8tydA1stBLzskvTUnMK9HLSy3JAWlJZEji____f1YGk5uDgtFUBaBYojiqOWbEmJPHAiQZPgCp_3DjhFeAxBLFsgC40DAN"
}
}
Methods
Get resource initialization status
Use this API to get the status of resource initialization in Data Product Hub.
If the data product catalog exists but has never been initialized, the status will be "not_started".
If the data product catalog exists and has been or is being initialized, the response will contain the status of the last or current initialization. If the initialization failed, the "errors" and "trace" fields will contain the error(s) encountered during the initialization, including the ID to trace the error(s).
If the data product catalog doesn't exist, an HTTP 404 response is returned.
GET /data_product_exchange/v1/configuration/initialize/status
Request
Query Parameters
Container ID of the data product catalog. If not supplied, the data product catalog is looked up by using the uid of the default data product catalog.
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/configuration/initialize/status' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Resource defining initialization parameters
Data product hub container
Link to monitor the status of the initialize operation
Example:
https://api.example.com/configuration/initialize/status?catalog_id=d29c42eb-7100-4b7a-8257-c196dbcca1cd
Status of the initialize operation
Possible values: [
not_started
,in_progress
,succeeded
,failed
]The id to trace the failed initialization operation
Set of errors on the latest initialization request.
Possible values: 0 ≤ number of items ≤ 20
Start time of the last initialization
Example:
2023-08-21T15:24:06.021Z
End time of the last initialization
Example:
2023-08-21T20:24:34.45Z
Initialized options
Possible values: 0 ≤ number of items ≤ 3
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "href": "https://api.example.com/configuration/initialize/status?container.id=d29c42eb-7100-4b7a-8257-c196dbcca1cd", "status": "not_started", "trace": "string", "errors": [ { "code": "missing_required_value", "message": "Missing required field catalog." } ], "last_started_at": "2023-02-17T12:03:17Z", "last_finished_at": "2023-09-14T03:57:06Z", "initialized_options": [ { "name": "string", "version": 1 } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Retrieve a list of IAM policies assigned to a service id for a DPH account
Internal ONLY
Retrieve a list of IAM policies assigned to a service id for a DPH account
GET /data_product_exchange/v1/configuration/get_policies
Response
- mediaType
- parameters
Possible values: contains only unique items
- entityTag
- stringHeaders
- statusInfo
Possible values: [
INFORMATIONAL
,SUCCESSFUL
,REDIRECTION
,CLIENT_ERROR
,SERVER_ERROR
,OTHER
]
Possible values: contains only unique items
- links
- params
- cookies
- any property
- language
Possible values: contains only unique items
Possible values: contains only unique items
Possible values: contains only unique items
- headers
- metadata
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Get service id credentials
Use this API to get the information of service id credentials in Data Product Hub.
GET /data_product_exchange/v1/configuration/credentials
Request
No Request Parameters
curl -X 'GET' '{url}/data_product_exchange/v1/configuration/credentials' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Service id credentials
Name of the api key of the service id
Example:
data-product-admin-service-id-API-key
Created date of the api key of the service id
Example:
2024-03-15T04:07+0000
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "name": "data-product-admin-service-id-API-key", "created_at": "2024-03-15T04:07+0000" } }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Initialize resources
Use this API to initialize default assets for data product hub.
You can initialize:
delivery_methods
- Methods through which data product parts can be delivered to consumers of the data product hubdomains_multi_industry
- Taxonomy of domains and use cases applicable to multiple industriesdata_product_samples
- Sample data products used to illustrate capabilities of the data product hubworkflows
- Workflows to enable restricted data products
If a resource depends on resources that are not specified in the request, these dependent resources will be automatically initialized. E.g., initializing
data_product_samples
will also initialize domains_multi_industry
and delivery_methods
even if they are not specified in the request because it depends on them.If initializing the data product hub for the first time, do not specify a container. The default data product catalog will be created.
For first time initialization, it is recommended that at least
delivery_methods
and domains_multi_industry
is included in the initialize operation.If the data product hub has already been initialized, you may call this API again to initialize new resources, such as new delivery methods.In this case, specify the default data product catalog container information.
POST /data_product_exchange/v1/configuration/initialize
Request
Configuration parameters for initializing Data Product Hub
First time initialization of a data product catalog
Initialize the data product catalog for the first time. In this example, delivery methods, multi-industry domain taxonomy, workflows, project are initialized and a set of sample data products is generated.
{
"include": [
"delivery_methods",
"domains_multi_industry",
"data_product_samples",
"workflows",
"project"
]
}
Initialize select resources in an existing data product catalog
Initialize a subset of resources in an existing data product catalog. In this example, only delivery methods are re-initialized. This will initialize any new delivery methods available on the platform.
{
"container": {
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd"
},
"include": [
"delivery_methods"
]
}
Data product hub container
List of configuration options to (re-)initialize.
Allowable values: [
delivery_methods
,domains_multi_industry
,data_product_samples
,workflows
,project
]Possible values: 1 ≤ number of items ≤ 4, 1 ≤ length ≤ 36
curl -X 'POST' '{url}/data_product_exchange/v1/configuration/initialize' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: bearer {bearer_token}' -d '{ "include": [ "delivery_methods", "domains_multi_industry", "data_product_samples", "workflows", "project" ] }'
curl -X 'POST' '{url}/data_product_exchange/v1/configuration/initialize' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: bearer {bearer_token}' -d '{ "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" }, "include": [ "delivery_methods" ] }'
Response
Resource defining initialization parameters
Data product hub container
Link to monitor the status of the initialize operation
Example:
https://api.example.com/configuration/initialize/status?catalog_id=d29c42eb-7100-4b7a-8257-c196dbcca1cd
Status of the initialize operation
Possible values: [
not_started
,in_progress
,succeeded
,failed
]The id to trace the failed initialization operation
Set of errors on the latest initialization request.
Possible values: 0 ≤ number of items ≤ 20
Start time of the last initialization
Example:
2023-08-21T15:24:06.021Z
End time of the last initialization
Example:
2023-08-21T20:24:34.45Z
Initialized options
Possible values: 0 ≤ number of items ≤ 3
Status Code
Accepted
Bad Request
Unauthorized
Forbidden
Conflict
Internal error
{ "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "href": "https://api.example.com/configuration/initialize/status?container.id=d29c42eb-7100-4b7a-8257-c196dbcca1cd", "status": "not_started", "trace": "string", "errors": [ { "code": "missing_required_value", "message": "Missing required field catalog." } ], "last_started_at": "2023-02-17T12:03:17Z", "last_finished_at": "2023-09-14T03:57:06Z", "initialized_options": [ { "name": "string", "version": 1 } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Rotate credentials for a Data Product Hub instance
Use this API to rotate credentials for a Data Product Hub instance.
POST /data_product_exchange/v1/configuration/rotate_credentials
Request
No Request Parameters
curl -X 'POST' '{url}/data_product_exchange/v1/configuration/rotate_credentials' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Status Code
No Content
Bad Request
Unauthorized
Forbidden
Conflict
Internal error
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Reinitialize resources in a data product hub
Internal ONLY
Use this API to reinitialize default assets for data product hub.
You can reinitialize:
delivery_methods
- Methods through which data product parts can be delivered to consumers of the data product hubdomains_multi_industry
- Taxonomy of domains and use cases applicable to multiple industriesdata_product_samples
- Sample data products used to illustrate capabilities of the data product hubworkflows
- Workflows to enable restricted data products
The data product catalog container information is required.
POST /data_product_exchange/v1/configuration/reinitialize
Request
Configuration parameters for initializing the data product hub
Reinitialization of a data product catalog
Reinitialize an existing data product catalog. In this example, delivery methods, multi-industry domain taxonomy, workflows and project will be reinitialized.
{
"container": {
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd"
},
"include": [
"delivery_methods",
"domains_multi_industry",
"data_product_samples",
"workflows",
"project"
]
}
Reinitialize select resources in an existing data product catalog
Reinitialize a subset of resources in an existing data product catalog. In this example, only delivery methods are re-initialized. This will initialize any new delivery methods available on the platform.
{
"container": {
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd"
},
"include": [
"delivery_methods"
]
}
Data product hub container
List of configuration options to (re-)initialize.
Allowable values: [
delivery_methods
,domains_multi_industry
,data_product_samples
,workflows
,project
]Possible values: 1 ≤ number of items ≤ 4, 1 ≤ length ≤ 36
Response
Resource defining initialization parameters
Data product hub container
Link to monitor the status of the initialize operation
Example:
https://api.example.com/configuration/initialize/status?catalog_id=d29c42eb-7100-4b7a-8257-c196dbcca1cd
Status of the initialize operation
Possible values: [
not_started
,in_progress
,succeeded
,failed
]The id to trace the failed initialization operation
Set of errors on the latest initialization request.
Possible values: 0 ≤ number of items ≤ 20
Start time of the last initialization
Example:
2023-08-21T15:24:06.021Z
End time of the last initialization
Example:
2023-08-21T20:24:34.45Z
Initialized options
Possible values: 0 ≤ number of items ≤ 3
Status Code
Accepted
Bad Request
Unauthorized
Forbidden
Conflict
Internal error
{ "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "href": "https://api.example.com/configuration/initialize/status?container.id=d29c42eb-7100-4b7a-8257-c196dbcca1cd", "status": "not_started", "trace": "string", "errors": [ { "code": "missing_required_value", "message": "Missing required field catalog." } ], "last_started_at": "2023-02-17T12:03:17Z", "last_finished_at": "2023-09-14T03:57:06Z", "initialized_options": [ { "name": "string", "version": 1 } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Test that credentials exist for a connction
Internal ONLY
Test that the credentials exist for a connction as both the caller user as well as the functional credentials owned by the DPH service ID for the DPH account
GET /data_product_exchange/v1/connections/{connection_id}/get_credentials
Request
Path Parameters
Connection ID
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Query Parameters
Catalog ID
Response
Whether the caller user has credentials on the requested connection.
Example:
true
Whether the catalog service id functional user has credentials on the requested connection.
Example:
true
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Update the connction with the functional credentials owned by the DPH service ID for the DPH account
Internal ONLY
Use this API to add the functional credentials to the connection or update the functional credentials of the connection
Note there are three credentials involved in this api:
- The user's own credentials who make this call.
- The service ID's credentials which make the connections PATCH call. The DPH service ID is for the DPH account (not the single DPH service Id).
- The connection credentials which are being patched (also indicated as the functional credentials owned by the DPH service ID).
Note this api does not update the user's own connection credentials.
Note the 'persional_credentials' flag must have been set at the connection creation.
Specify patch operations using http://jsonpatch.com/ syntax.
PATCH /data_product_exchange/v1/connections/{connection_id}/service_credentials
Request
Path Parameters
Connection ID
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Query Parameters
Catalog ID
Whether to test the connection before saving it.
A set of patch operations as defined in RFC 6902. See http://jsonpatch.com/ for more information.
Example: {"op": "add""path": "/properties/access_key""value": "AKIATGIGBNSZTRWDWJERb52"},{"op": "add""path": "/properties/secret_key""value": "260ba3f7a6b0a5bd5283851b5532"}
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "name": "Personal Connection", "flags": [ "personal_credentials" ], "properties": { "bucket": "DPH-test-bucket", "secret_key": "AKIATGIGBNSZTRWDWJERb52", "access_key": "260ba3f7a6b0a5bd5283851b5532" } }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Retrieve a list of data products
Retrieve a list of data products
GET /data_product_exchange/v1/data_products
Request
Query Parameters
Limit the number of data products in the results. The maximum limit is 200.
Possible values: 1 ≤ value ≤ 200
Default:
200
Start token for pagination
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
A collection of data product summaries
Set a limit on the number of results returned.
Example:
200
First page in the collection
Collection of data product summaries
Possible values: 0 ≤ number of items ≤ 10000
Next page in the collection
Status Code
OK
Bad Request
Unauthorized
Forbidden
Internal error
{ "limit": 200, "first": { "href": "https://api.example.com/collection" }, "next": { "href": "https://api.example.com/collection?start=eyJvZmZzZXQiOjAsImRvbmUiOnRydWV9", "start": "eyJvZmZzZXQiOjAsImRvbmUiOnRydWV9" }, "data_products": [ { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "name": "Sample Data Product" } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Create a new data product
Use this API to create a new data product.
Provide the initial draft of the data product.
Required fields:
- name
- container
If version
is not specified, the default version 1.0.0 will be used.
The domain
is optional.
POST /data_product_exchange/v1/data_products
Request
Data Product request
Create the first version of a data product
Create a new data product by specifying a list of a single draft, containing the data product container id, and the name of the data product. If no other information is specified, then a data product draft with version 1.0.0 will be created. Additional information can be added using the PATCH /data_product_exchange/v1/data_product/{id}/drafts/{draft_id}
API until the data product draft is published.
{
"drafts": [
{
"name": "My New Data Product",
"asset": {
"container": {
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd"
}
}
}
]
}
Collection of data products drafts to add to data product
Possible values: 0 ≤ number of items ≤ 1
curl -X 'POST' '{url}/data_product_exchange/v1/data_products' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: bearer {bearer_token}' -d '{ "drafts": [ { "name": "My New Data Product", "asset": { "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" } } } ] }'
Response
Data Product
Data product identifier
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
b38df608-d34b-4d58-8136-ed25e6c6684e
Data product hub container
Summary of Data Product Version object
List of draft summaries of this data product
Possible values: 0 ≤ number of items ≤ 10000
Status Code
Created
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "drafts": [ { "id": "2eec88cf-eec2-4860-95d0-8db734474340@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "version": "1.0.0", "state": "draft", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "Sample Data Product", "description": "A sample data product", "parts_out": [], "contract_terms": [], "asset": { "id": "2eec88cf-eec2-4860-95d0-8db734474340", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Retrieve a data product identified by id
Retrieve a data product identified by id
GET /data_product_exchange/v1/data_products/{data_product_id}
Request
Path Parameters
Data product ID
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products/{data_product_id}' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Data Product
Data product identifier
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
b38df608-d34b-4d58-8136-ed25e6c6684e
Data product hub container
Summary of Data Product Version object
List of draft summaries of this data product
Possible values: 0 ≤ number of items ≤ 10000
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "drafts": [ { "id": "2eec88cf-eec2-4860-95d0-8db734474340@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "version": "1.0.0", "state": "draft", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "Sample Data Product", "description": "A sample data product", "parts_out": [], "contract_terms": [], "asset": { "id": "2eec88cf-eec2-4860-95d0-8db734474340", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Complete a contract document upload operation
After uploading a file to the provided signed URL, call this endpoint to mark the upload as complete. After the upload operation is marked as complete, the file is available to download.
- After the upload is marked as complete, the returned URL is displayed in the "url" field. The signed URL is used to download the document.
- Calling complete on referential documents results in an error.
- Calling complete on attachment documents for which the file has not been uploaded will result in an error.
POST /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}/complete
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Contract terms id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Document id
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'POST' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}/complete' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Standard contract terms document, which is used for get and list contract terms responses
Type of the contract document
Possible values: [
terms_and_conditions
,sla
]Name of the contract document
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Id uniquely identifying this document within the contract terms instance
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
2b0bf220-079c-11ee-be56-0242ac120002
URL that can be used to retrieve the contract document
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^https?:\/\/[^\s<>]+$
Attachment associated witht the document
URL which can be used to upload document file
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "name": "contract 1", "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "type": "terms_and_conditions", "attachment": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" }, "url": "https://s3" }
Retrieve a list of data product drafts
Retrieve a list of data product drafts
GET /data_product_exchange/v1/data_products/{data_product_id}/drafts
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Query Parameters
Filter the list of data product drafts by container id.
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Filter the list of data product drafts by version number.
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Limit the number of data product drafts in the results. The maximum limit is 200.
Possible values: 1 ≤ value ≤ 200
Default:
200
Start token for pagination
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
A collection of data product draft summaries
Set a limit on the number of results returned.
Example:
200
First page in the collection
Collection of data product drafts
Possible values: 0 ≤ number of items ≤ 10000
Next page in the collection
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "limit": 200, "first": { "href": "https://api.example.com/collection" }, "next": { "href": "https://api.example.com/collection?start=eyJvZmZzZXQiOjAsImRvbmUiOnRydWV9", "start": "eyJvZmZzZXQiOjAsImRvbmUiOnRydWV9" }, "drafts": [ { "version": "1.0.0", "state": "draft", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Create a new draft of an existing data product
Create a new draft of an existing data product
POST /data_product_exchange/v1/data_products/{data_product_id}/drafts
Request
Path Parameters
Data product ID
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data Product Draft request
Create a new draft of an existing data product
Create a new draft of a data product by specifying:
- The data product container id to create the data product draft in
- The new version number
- The data product id for which the draft was created
If no other information is specified, the new draft will be a copy of the latest available data product draft or release.
{
"version": "1.2.0",
"asset": {
"container": {
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd"
}
},
"data_product": {
"id": "b38df608-d34b-4d58-8136-ed25e6c6684e"
}
}
The asset referenced by the data product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version. If not specified, the data product version will be created in
draft
state.Allowable values: [
draft
,available
,retired
]Data product identifier
The name that refers to the new data product version. If this is a new data product, this value must be specified. If this is a new version of an existing data product, the name will default to the name of the previous data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. A name must contain at least one non-space character.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
Description of the data product version. If this is a new version of an existing data product, the description will default to the description of the previous version of the data product.
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
Tags on the new data product version. If this is the first version of a data product, tags defaults to an empty list. If this is a new version of an existing data product, tags will default to the list of tags on the previous version of the data product.
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Use cases that the data product version serves. If this is the first version of a data product, use cases defaults to an empty list. If this is a new version of an existing data product, use cases will default to the list of use cases on the previous version of the data product.
Possible values: 0 ≤ number of items ≤ 1000
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
The types of the parts included in this data product version. If this is the first version of a data product, this field defaults to an empty list. If this is a new version of an existing data product, the types will default to the types of the previous version of the data product.
Allowable values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The outgoing parts of this data product version to be delivered to consumers. If this is the first version of a data product, this field defaults to an empty list. If this is a new version of an existing data product, the data product parts will default to the parts list from the previous version of the data product.
Possible values: 0 ≤ number of items ≤ 1000
The contract terms that bind interactions with this data product version.
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
curl -X 'POST' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: bearer {bearer_token}' -d '{ "name": "My Data Product", "state": "draft", "version": "1.0.0", "description": "This is a description of My Data Product.", "tags": ["some_tag"], "use_cases": [ "id": "a4e28c73-b2d6-4df5-aaf2-747fe3033b1a", "name": "Sample Use Case Name" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name" }, "type": ["data"], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "delivery_methods": [ "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } ] } ] }'
curl -X 'POST' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: bearer {bearer_token}' -d '{ "version": "1.2.0", "asset": { "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" } }, "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" } }'
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
Created
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "contract_terms": [ { "id": "598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82", "documents": [ { "url": "https://www.ibm.com/some_document", "type": "terms_and_conditions", "name": "Terms and conditions document", "id": "c1258691-0dd8-48ab-8e65-70640eb537b8" } ] } ], "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "tags": [ "sometag" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "type": [ "data" ], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "type": "data_asset" }, "revision": 1, "updated_at": "2023-06-27T15:55:07Z", "delivery_methods": [ { "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } ] } ], "created_by": "userid", "created_at": "2023-06-27T15:00:07Z", "published_by": "userid", "published_at": "2023-06-27T15:55:07Z" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Upload a contract document to the data product draft contract terms
Upload a contract document to the data product draft identified by draft_id.
- If the request object contains a "url" parameter, a referential document is created to store the provided url.
- If the request object does not contain a "url" parameter, an attachment document is created, and a signed url will be returned in an "upload_url" parameter. The data product producer can upload the document using the provided "upload_url". After the upload is completed, call "complete_contract_terms_document" for the given document needs to be called to mark the upload as completed. After completion of the upload, "get_contract_terms_document" for the given document returns a signed "url" parameter that can be used to download the attachment document.
POST /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Contract terms id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Definition of a ContractTermsDocument object
Managed document, response will contain a URL that can be used for upload
Managed document example
{
"id": "b38df608-d34b-4d58-8136-ed25e6c6684e",
"name": "Terms and conditions document",
"type": "terms_and_conditions"
}
Referenced document, holds URL reference to ane external resource
Referenced document example
{
"id": "b38df608-d34b-4d58-8136-ed25e6c6684e",
"name": "Terms and conditions document",
"type": "terms_and_conditions",
"url": "https://www.ibm.com/some_document"
}
Type of the contract document
Allowable values: [
terms_and_conditions
,sla
]Name of the contract document
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Id uniquely identifying this document within the contract terms instance
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
2b0bf220-079c-11ee-be56-0242ac120002
URL that can be used to retrieve the contract document
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^https?:\/\/[^\s<>]+$
Attachment associated witht the document
URL which can be used to upload document file
curl -X 'POST' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: bearer {bearer_token}' -d '{ "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "name": "Terms and conditions document", "type": "terms_and_conditions" }'
curl -X 'POST' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents' -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: bearer {bearer_token}' -d '{ "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "name": "Terms and conditions document", "type": "terms_and_conditions", "url": "https://www.ibm.com/some_document" }'
Response
Standard contract terms document, which is used for get and list contract terms responses
Type of the contract document
Possible values: [
terms_and_conditions
,sla
]Name of the contract document
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Id uniquely identifying this document within the contract terms instance
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
2b0bf220-079c-11ee-be56-0242ac120002
URL that can be used to retrieve the contract document
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^https?:\/\/[^\s<>]+$
Attachment associated witht the document
URL which can be used to upload document file
Status Code
Created
Bad Request
Unauthorized
Forbidden
Conflict
Internal error
{ "name": "contract 1", "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "type": "terms_and_conditions", "attachment": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" }, "upload_url": "https://s3" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Get a draft of an existing data product
Get a draft of an existing data product
GET /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "contract_terms": [ { "id": "598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82", "documents": [ { "url": "https://www.ibm.com/some_document", "type": "terms_and_conditions", "name": "Terms and conditions document", "id": "c1258691-0dd8-48ab-8e65-70640eb537b8" } ] } ], "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "tags": [ "sometag" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "type": [ "data" ], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "type": "data_asset" }, "revision": 1, "updated_at": "2023-06-27T15:55:07Z", "delivery_methods": [ { "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } ] } ], "created_by": "userid", "created_at": "2023-06-27T15:00:07Z", "published_by": "userid", "published_at": "2023-06-27T15:55:07Z" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Delete a data product draft identified by ID
Delete a data product draft identified by a valid ID.
DELETE /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
curl -X 'DELETE' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Status Code
No Content
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Update the data product draft identified by ID
Use this API to update the properties of a data product draft identified by a valid ID.
Specify patch operations using http://jsonpatch.com/ syntax.
Supported patch operations include:
- Update the properties of a data product
- Add/Remove parts from a data product (up to 20 parts)
- Add/Remove use cases from a data product
- Update the data product state
PATCH /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
A set of patch operations as defined in RFC 6902. See http://jsonpatch.com/ for more information.
Change the state of a data product draft
Change state to available.
[
{
"op": "replace",
"path": "/state",
"value": "available"
}
]
Update the primary properties of a data product draft
Update the description.
[
{
"op": "replace",
"path": "/description",
"value": "New description for my data product"
}
]
Add parts to a data product draft
Add parts.
[
{
"op": "add",
"path": "/parts_out",
"value": [
{
"asset": {
"id": "b54ad481-eec6-4735-98b8-2dd5cd07f8cc",
"container": {
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
"type": "catalog"
}
},
"updated_at": "2023-06-02T19:22:01Z",
"revision": 1
}
]
}
]
Remove parts from a data product draft
Remove parts.
[
{
"op": "remove",
"path": "/parts_out/0"
}
]
A JSON pointer to the field to update
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[/\w\.,:$&\(\)\s\-\_\^"]+$
Value to apply during the patch operation
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "replace", "path": "/state", "value": "available" } ]'
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "replace", "path": "/description", "value": "New description for my data product" } ]'
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "add", "path": "/parts_out", "value": [ { "asset": { "id": "b54ad481-eec6-4735-98b8-2dd5cd07f8cc", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "updated_at": "2023-06-02T19:22:01Z", "revision": 1 } ] } ]'
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "remove", "path": "/parts_out/0" } ]'
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "contract_terms": [ { "id": "598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82", "documents": [ { "url": "https://www.ibm.com/some_document", "type": "terms_and_conditions", "name": "Terms and conditions document", "id": "c1258691-0dd8-48ab-8e65-70640eb537b8" } ] } ], "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "tags": [ "sometag" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "type": [ "data" ], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "type": "data_asset" }, "revision": 1, "updated_at": "2023-06-27T15:55:07Z", "delivery_methods": [ { "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } ] } ], "created_by": "userid", "created_at": "2023-06-27T15:00:07Z", "published_by": "userid", "published_at": "2023-06-27T15:55:07Z" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Get a contract document
If a document has a completed attachment, the response contains the url
which can be used to download the attachment.
If a document does not have a completed attachment, the response contains the url
which was submitted at document creation.
If a document has an attachment that is incomplete, an error is returned to prompt the user to upload the document file and complete it.
GET /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Contract terms id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Document id
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Standard contract terms document, which is used for get and list contract terms responses
Type of the contract document
Possible values: [
terms_and_conditions
,sla
]Name of the contract document
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Id uniquely identifying this document within the contract terms instance
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
2b0bf220-079c-11ee-be56-0242ac120002
URL that can be used to retrieve the contract document
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^https?:\/\/[^\s<>]+$
Attachment associated witht the document
URL which can be used to upload document file
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "name": "contract 1", "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "type": "terms_and_conditions", "attachment": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" }, "url": "https://s3" }
Delete a contract document
Delete an existing contract document.
Contract documents can only be deleted for data product versions that are in DRAFT state.
DELETE /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Contract terms id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Document id
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'DELETE' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Update a contract document
Use this API to update the properties of a contract document that is identified by a valid ID.
Specify patch operations using http://jsonpatch.com/ syntax.
Supported patch operations include:
- Update the url of document if it does not have an attachment.
- Update the type of the document.
Contract terms documents can only be updated if the associated data product version is in DRAFT state.
PATCH /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Contract terms id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Document id
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A set of patch operations as defined in RFC 6902. See http://jsonpatch.com/ for more information.
Change type of the contract terms document to SLA
Change type to SLA.
[
{
"op": "replace",
"path": "/type",
"value": "sla"
}
]
A JSON pointer to the field to update
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[/\w\.,:$&\(\)\s\-\_\^"]+$
Value to apply during the patch operation
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "replace", "path": "/type", "value": "sla" } ]'
Response
Standard contract terms document, which is used for get and list contract terms responses
Type of the contract document
Possible values: [
terms_and_conditions
,sla
]Name of the contract document
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Id uniquely identifying this document within the contract terms instance
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
2b0bf220-079c-11ee-be56-0242ac120002
URL that can be used to retrieve the contract document
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^https?:\/\/[^\s<>]+$
Attachment associated witht the document
URL which can be used to upload document file
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "name": "contract 1", "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "type": "terms_and_conditions", "attachment": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" }, "url": "https://s3" }
Publish a draft of an existing data product
Publish a draft of an existing data product
POST /data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/publish
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product draft id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
curl -X 'POST' '{url}/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/publish' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "contract_terms": [ { "id": "598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82", "documents": [ { "url": "https://www.ibm.com/some_document", "type": "terms_and_conditions", "name": "Terms and conditions document", "id": "c1258691-0dd8-48ab-8e65-70640eb537b8" } ] } ], "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "tags": [ "sometag" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "type": [ "data" ], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "type": "data_asset" }, "revision": 1, "updated_at": "2023-06-27T15:55:07Z", "delivery_methods": [ { "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } ] } ], "created_by": "userid", "created_at": "2023-06-27T15:00:07Z", "published_by": "userid", "published_at": "2023-06-27T15:55:07Z" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Deliver a data product identified by id
Internal ONLY
Deliver a data product release identified by id
POST /data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/deliver
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product release id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Information about the order for which the data product should be delivered
Order containing multiple items
Deliver a data product that contains multiple items (parts). The items list can specify a subset of items in the order or all the items. Only the items listed in the items array will be delivered.
{
"order": {
"id": "4705e047-1808-459a-805f-d5d13c947637",
"items": [
{
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd"
},
{
"id": "260ba3f7-a6b0-4e9b-a5bd-5283851b5532"
}
]
}
}
The order for the data product that should be delivered as part of this delivery operation.
Response
Delivery status resource
Status of the deliver operation
Possible values: [
not_started
,ready_to_deliver
,redeliver
,reattempt
,received
,in_progress
,delivered
,partially_delivered
,succeeded
,failed
,under_review
,rerequest
,cancelled
,rejected
,workflow_exception
]Link to monitor the status of the deliver operation
Status Code
Accepted
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "status": "received", "href": "https://internal.api.dataplatform.dev.cloud.ibm.com/v2/asset_lists/c9e1bd19-210b-4c49-ab6b-627ba1ed7ce0/items/7eff12fe-4a3c-49f3-bd8b-388cbf134219" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Get a release of an existing data product
Get a release of an existing data product
GET /data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product release id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "contract_terms": [ { "id": "598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82", "documents": [ { "url": "https://www.ibm.com/some_document", "type": "terms_and_conditions", "name": "Terms and conditions document", "id": "c1258691-0dd8-48ab-8e65-70640eb537b8" } ] } ], "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "tags": [ "sometag" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "type": [ "data" ], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "type": "data_asset" }, "revision": 1, "updated_at": "2023-06-27T15:55:07Z", "delivery_methods": [ { "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } ] } ], "created_by": "userid", "created_at": "2023-06-27T15:00:07Z", "published_by": "userid", "published_at": "2023-06-27T15:55:07Z" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Update the data product release identified by ID
Use this API to update the properties of a data product release identified by a valid ID.
Specify patch operations using http://jsonpatch.com/ syntax.
Supported patch operations include:
- Update the properties of a data product
- Add/remove parts from a data product (up to 20 parts)
- Add/remove use cases from a data product
PATCH /data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product release id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
A set of patch operations as defined in RFC 6902. See http://jsonpatch.com/ for more information.
Update the primary properties of a data product release
Update the description.
[
{
"op": "replace",
"path": "/description",
"value": "New description for my data product"
}
]
Add parts to a data product release
Add parts.
[
{
"op": "add",
"path": "/parts_out",
"value": [
{
"asset": {
"id": "b54ad481-eec6-4735-98b8-2dd5cd07f8cc",
"container": {
"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
"type": "catalog"
}
},
"updated_at": "2023-06-02T19:22:01Z",
"revision": 1
}
]
}
]
Remove parts from a data product release
Remove parts.
[
{
"op": "remove",
"path": "/parts_out/0"
}
]
A JSON pointer to the field to update
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[/\w\.,:$&\(\)\s\-\_\^"]+$
Value to apply during the patch operation
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "replace", "path": "/description", "value": "New description for my data product" } ]'
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "add", "path": "/parts_out", "value": [ { "asset": { "id": "b54ad481-eec6-4735-98b8-2dd5cd07f8cc", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "updated_at": "2023-06-02T19:22:01Z", "revision": 1 } ] } ]'
curl -X 'PATCH' '{url}/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}' -H 'Accept: application/json' -H 'Content-Type: application/json-patch+json' -H 'Authorization: bearer {bearer_token}' -d '[ { "op": "remove", "path": "/parts_out/0" } ]'
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "contract_terms": [ { "id": "598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82", "documents": [ { "url": "https://www.ibm.com/some_document", "type": "terms_and_conditions", "name": "Terms and conditions document", "id": "c1258691-0dd8-48ab-8e65-70640eb537b8" } ] } ], "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "tags": [ "sometag" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "type": [ "data" ], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "type": "data_asset" }, "revision": 1, "updated_at": "2023-06-27T15:55:07Z", "delivery_methods": [ { "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } ] } ], "created_by": "userid", "created_at": "2023-06-27T15:00:07Z", "published_by": "userid", "published_at": "2023-06-27T15:55:07Z" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Get a contract document
If the document has a completed attachment, the response contains the url
to download the attachment.
If the document does not have an attachment, the response contains the url
which was submitted at document creation.
If the document has an incomplete attachment, an error is returned to prompt the user to upload the document file to complete the attachment.
GET /data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/contract_terms/{contract_terms_id}/documents/{document_id}
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product release id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Contract terms id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
Document id
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/contract_terms/{contract_terms_id}/documents/{document_id}' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Standard contract terms document, which is used for get and list contract terms responses
Type of the contract document
Possible values: [
terms_and_conditions
,sla
]Name of the contract document
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Id uniquely identifying this document within the contract terms instance
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
2b0bf220-079c-11ee-be56-0242ac120002
URL that can be used to retrieve the contract document
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^https?:\/\/[^\s<>]+$
Attachment associated witht the document
URL which can be used to upload document file
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "name": "contract 1", "id": "b38df608-d34b-4d58-8136-ed25e6c6684e", "type": "terms_and_conditions", "attachment": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd" }, "url": "https://s3" }
Retrieve a list of data product releases
Retrieve a list of data product releases
GET /data_product_exchange/v1/data_products/{data_product_id}/releases
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Query Parameters
Filter the list of data product releases by container id.
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Filter the list of data product versions by state. States are: available and retired. Default is "available","retired".
Allowable values: [
available
,retired
]Possible values: 0 ≤ number of items ≤ 2
Filter the list of data product releases by version number.
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Limit the number of data product releases in the results. The maximum is 200.
Possible values: 1 ≤ value ≤ 200
Default:
200
Start token for pagination
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
curl -X 'GET' '{url}/data_product_exchange/v1/data_products/{data_product_id}/releases' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
A collection of data product release summaries
Set a limit on the number of results returned.
Example:
200
First page in the collection
Collection of data product releases
Possible values: 0 ≤ number of items ≤ 10000
Next page in the collection
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "limit": 200, "first": { "href": "https://api.example.com/collection" }, "next": { "href": "https://api.example.com/collection?start=eyJvZmZzZXQiOjAsImRvbmUiOnRydWV9", "start": "eyJvZmZzZXQiOjAsImRvbmUiOnRydWV9" }, "releases": [ { "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Re-deliver a data product identified by id
Internal ONLY
Re-deliver a data product release identified by id
POST /data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/orders/{order_id}/items/{item_id}/redeliver
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product release id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
An order id.
Possible values: length = 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
An order item id. This API can be used by data product producers to re-deliver a data product order item. An order item can be re-delivered only if the order item was successfully delivered and its delivery method supports re-delivery.
Possible values: 36 ≤ length ≤ 73, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Response
Delivery status resource
Status of the deliver operation
Possible values: [
not_started
,ready_to_deliver
,redeliver
,reattempt
,received
,in_progress
,delivered
,partially_delivered
,succeeded
,failed
,under_review
,rerequest
,cancelled
,rejected
,workflow_exception
]Link to monitor the status of the deliver operation
Status Code
Accepted
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal error
{ "status": "received", "href": "https://internal.api.dataplatform.dev.cloud.ibm.com/v2/asset_lists/c9e1bd19-210b-4c49-ab6b-627ba1ed7ce0/items/7eff12fe-4a3c-49f3-bd8b-388cbf134219" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Retire a release of an existing data product
Retire a release of an existing data product
POST /data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/retire
Request
Path Parameters
Data product ID. Use '-' to skip specifying the data product ID explicitly.
Possible values: 1 ≤ length ≤ 36, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Data product release id
Possible values: length = 73, Value must match regular expression
^[\w\.,:$&@\(\)\s\-\_\^"]+$
curl -X 'POST' '{url}/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/retire' -H 'Accept: application/json' -H 'Authorization: bearer {bearer_token}'
Response
Data Product version
The data product version number
Possible values: 5 ≤ length ≤ 36, Value must match regular expression
^[\d]+.[\d]+.[\d]+$
Example:
1.0.0
The state of the data product version
Possible values: [
draft
,available
,retired
]Data product identifier
The name of the data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. Names are mutable and reusable.
Possible values: 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
My Data Product
The description of the data product version
Possible values: 1 ≤ length ≤ 4000, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
Example:
This is a description of My Data Product.
The identifier of the data product version
Example:
2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd
The asset referenced by the data product version
Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product.
Outgoing parts of a data product used to deliver the data product to consumers
Possible values: 0 ≤ number of items ≤ 1000
The creator of this data product version
The time when this data product version was created
Tags on the data product
Possible values: 0 ≤ number of items ≤ 1000, 1 ≤ length ≤ 256, Value must match regular expression
^[\w\.,:$&\(\)\s\-\_\^"]+$
A list of use cases associated with the data product version
Possible values: 0 ≤ number of items ≤ 1000
Types of parts on the data product
Possible values: [
data
,code
]Possible values: 0 ≤ number of items ≤ 1000
The user who published this data product version
The time when this data product version was published
Contract terms binding various aspects of the data product
Possible values: 0 ≤ number of items ≤ 1000
The workflows associated with the data product version.
Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered
Status Code
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal error
{ "version": "1.0.0", "state": "available", "data_product": { "id": "b38df608-d34b-4d58-8136-ed25e6c6684e" }, "name": "My Data Product", "description": "This is a description of My Data Product.", "id": "2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd", "contract_terms": [ { "id": "598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82", "documents": [ { "url": "https://www.ibm.com/some_document", "type": "terms_and_conditions", "name": "Terms and conditions document", "id": "c1258691-0dd8-48ab-8e65-70640eb537b8" } ] } ], "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "tags": [ "sometag" ], "domain": { "id": "c410bd17-a365-482f-8884-f6c08a162597", "name": "Sample Domain Name", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } }, "type": [ "data" ], "parts_out": [ { "asset": { "id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" }, "type": "data_asset" }, "revision": 1, "updated_at": "2023-06-27T15:55:07Z", "delivery_methods": [ { "id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": { "id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog" } } ] } ], "created_by": "userid", "created_at": "2023-06-27T15:00:07Z", "published_by": "userid", "published_at": "2023-06-27T15:55:07Z" }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Check health status of certain service on CP4D/IBM Cloud
Internal ONLY
Return the health status of a service.
The following services can be checked:
postgres
(IBM Cloud)redis
(IBM Cloud)cams
(IBM Cloud/CP4D)global_search
(IBM Cloud/CP4D)mq
(IBM Cloud/CP4D)ui
(IBM Cloud)
GET /data_product_exchange/v1/healthcheck/services/{service_name}
Get the heartbeat of the Data Product Hub API service
Internal ONLY
Get the heartbeat of the Data Product Hub API service
GET /data_product_exchange/v1/heartbeat
Request
No Request Parameters
curl -X 'GET' '{url}/data_product_exchange/v1/heartbeat' -H 'Accept: application/json'
Response
Data Product API service heartbeat
Data Product API service version
Status of the Data Product API service
Data Product API service name
Status Code
OK
Internal error. Try again later.
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
Request a new data product
Internal ONLY
Use this API to create a task for a data product producer to create a new data product that meets the requested requirements
POST /data_product_exchange/v1/data_product_request
Request
Required fields for requesting a new data product:
name
- The name of the requestdata_product_content
overview
- An overview of the requested data productbusiness_justfication
- Reasons why this data is requiredkey_features
- Key features requested for the new data productdata_contract
privacy
- If you need access to the sensitive information in the data product
Request a new data product with only required fields
{
"name": "The name of the request",
"data_product_content": {
"overview": "An overview of the requested data product",
"business_justification": "Reasons why this data is required ",
"key_features": "Key features requested for the new data product"
},
"data_contract": {
"privacy": "No - I cannot use the data if it contains sensitive information"
}
}
This is a request of new data product that contains all possible fields
{
"name": "The name of the request",
"domain": {
"name": "A business domain of the data"
},
"due_date": "2099-07-04T12:08:56.235-07:00",
"data_product_content": {
"overview": "An overview of the requested data product",
"sample": {
"text": "URL or description of sample of the requested data product"
},
"business_justification": "Reasons why this data is required",
"key_features": "Key features requested for the new data product",
"delivery_methods": [
{
"name": "A delivery method of the requested new data product"
}
]
},
"data_contract": {
"privacy": "No - I cannot use the data if it contains sensitive information",
"sharing_requirements": {
"intents": [
"Yes - I need to share this data with users who are internal to my organization"
]
},
"data_quality": "Data quality requirements of the requested data product",
"refresh_frequency": "Frequency to refresh the requested data product"
}
}
The name of the new data product request
Possible values: length ≤ 1000
The content of the requested data product
Possible values: length ≤ 1000
The data contract of the requested data product
Possible values: length ≤ 1000
A business domain of the data
Possible values: length ≤ 1000
The due date of the request
Possible values: length ≤ 1000, Value must match regular expression
yyyy-MM-dd'T'HH:mm:ss.SSSXXX
Response
Status Code
Accepted
Bad Request
Unauthorized
Forbidden
Internal error
Service Unavailable
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }
{ "trace": "byj4o9ubzrspbyh7ymkspfot0", "errors": [ { "code": "unexpected_exception", "message": "Example error message." } ] }