IBM Cloud API Docs

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.

Table 1. Error codes
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.

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"
}

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"
}

List delivery methods

POST /v2/asset_types/ibm_data_product_delivery_method/search?catalog_id={catalog_guid}

Example request to list all domains

{
    "query": "*:*"
}

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_id - The data product to which this item in the order belongs
  • data_product_delivery_state - The overall delivery state of the data product for this 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.
  • data_product_id - The data product to which this item in the order belongs
  • delivery_method.asset_id - The ID of the asset representing the data product part for this item
  • delivery_method.catalog_id - The catalog ID for the asset representing the data product part for this item
  • data_product_delivery_state - The delivery state for this item
  • data_product_delivery_state_modified - The date when the delivery state for this item was last modified
  • assets_out - The IDs of any assets produced as part of the delivery of this item

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"
        }
      }
    }
  ]
}

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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.configuration.monitor

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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 ONLYRetrieve a list of IAM policies assigned to a service id for a DPH account

GET /data_product_exchange/v1/configuration/get_policies

Request

No Request Parameters

This method does not accept any request parameters.

Response

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.configuration.monitor

Request

No Request Parameters

This method does not accept any 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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
        "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 hub
  • domains_multi_industry - Taxonomy of domains and use cases applicable to multiple industries
  • data_product_samples - Sample data products used to illustrate capabilities of the data product hub
  • workflows - 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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.configuration.create

Request

Configuration parameters for initializing Data Product Hub

Examples:
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.
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.
  • 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

Status Code

  • Accepted

  • Bad Request

  • Unauthorized

  • Forbidden

  • Conflict

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.configuration-apikey.rotate

Request

No Request Parameters

This method does not accept any 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

Example responses
  • {
      "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 ONLYUse 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 hub
  • domains_multi_industry - Taxonomy of domains and use cases applicable to multiple industries
  • data_product_samples - Sample data products used to illustrate capabilities of the data product hub
  • workflows - 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

Examples:
Reinitialize an existing data product catalog. In this example, delivery methods, multi-industry domain taxonomy, workflows and project will be reinitialized.
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.

Response

Resource defining initialization parameters

Status Code

  • Accepted

  • Bad Request

  • Unauthorized

  • Forbidden

  • Conflict

  • Internal error

Example responses
  • {
      "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 ONLYTest 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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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 ONLYUse 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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product.list

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product.create

Request

Data Product request

Examples:
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.
  • 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

Status Code

  • Created

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product.read

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft-contract-term-document.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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft.list

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft.create

Request

Path Parameters

  • Data product ID

    Possible values: length = 36, Value must match regular expression ^[\w\.,:$&\(\)\s\-\_\^"]+$

Data Product Draft request

Examples:
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 <br/><br/>If no other information is specified, the new draft will be a copy of the latest available data product draft or release.
  • 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

Status Code

  • Created

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft-contract-term-document.upload

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

Examples:
Managed document example
Referenced document example
  • 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

Status Code

  • Created

  • Bad Request

  • Unauthorized

  • Forbidden

  • Conflict

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft.read

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft.delete

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

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft.update

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.

Examples:
Change state to available.
Update the description.
Add parts.
Remove parts.
  • 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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft-contract-term-document.read

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft-contract-term-document.delete

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}'

Response

Status Code

  • No Content

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

No Sample Response

This method does not specify any sample responses.

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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft-contract-term-document.update

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.

Examples:
Change type to SLA.
  • 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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-draft.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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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 ONLYDeliver 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

Examples:
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.

Response

Delivery status resource

Status Code

  • Accepted

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-release.read

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-release.update

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.

Examples:
Update the description.
Add parts.
Remove parts.
  • 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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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}

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-release-contract-term-document.read

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-release.list

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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 ONLYRe-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 Code

  • Accepted

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Conflict

  • Internal error

Example responses
  • {
      "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

Auditing

Calling this method generates the following auditing event.

  • data-product-hub.data-product-release.expire

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

Status Code

  • OK

  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Internal error

Example responses
  • {
      "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 ONLYReturn 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}

Request

Path Parameters

  • curl -X 'GET' '{url}/data_product_exchange/v1/healthcheck/services/{service_name}' -H 'Accept: application/json' 

Response

Status Code

  • default response

No Sample Response

This method does not specify any sample responses.

Get the heartbeat of the Data Product Hub API service

Internal ONLYGet the heartbeat of the Data Product Hub API service

GET /data_product_exchange/v1/heartbeat

Request

No Request Parameters

This method does not accept any request parameters.

  • curl -X 'GET' '{url}/data_product_exchange/v1/heartbeat' -H 'Accept: application/json' 

Response

Data Product API service heartbeat

Status Code

  • OK

  • Internal error. Try again later.

Example responses
  • {
      "trace": "byj4o9ubzrspbyh7ymkspfot0",
      "errors": [
        {
          "code": "unexpected_exception",
          "message": "Example error message."
        }
      ]
    }

Request a new data product

Internal ONLYUse 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 request
  • data_product_content
    • overview - An overview of the requested data product
    • business_justfication - Reasons why this data is required
    • key_features - Key features requested for the new data product
  • data_contract
    • privacy - If you need access to the sensitive information in the data product

Examples:
Request a new data product with only required fields
Request a new data product with all possible fields

Response

Status Code

  • Accepted

  • Bad Request

  • Unauthorized

  • Forbidden

  • Internal error

  • Service Unavailable

Example responses
  • {
      "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."
        }
      ]
    }