IBM Cloud Docs
Data Product Hub Command Line Interface

Data Product Hub Command Line Interface

The Data Product Hub command-line interface (CLI) provides commands to manage Data Product Hub, including initialization, data product draft creation, publishing data products, API key rotation, managing uploaded PDFs, and other functionality.

Prerequisites

  • Install the IBM Cloud CLI.

  • Install the Data Product Hub CLI by running the plugin install command. You can use the full plugin name (data-product-hub) or the alias (dph) to install:

    ibmcloud plugin install data-product-hub
    
    ibmcloud plugin install dph
    

You're notified on the command line when updates to the IBM Cloud CLI and plug-ins are available. Be sure to keep your CLI up to date so that you can use the latest commands. You can view the current version of all installed plug-ins by running ibmcloud plugin list.

IBM Cloud CLI requires Java™ 1.8.0.

Data Products

Data Product APIs.

ibmcloud dph data-products

Retrieve a list of data products. Note: If the --all-pages option is not set, the command will only retrieve a single page of the collection.

ibmcloud dph data-products [--limit LIMIT] [--start START]

Command options

--limit (int64)

Limit the number of data products in the results. The maximum limit is 200.

The default value is 200. The maximum value is 200. The minimum value is 1.

--start (string)

Start token for pagination.

The maximum length is 256 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--all-pages (bool)

Invoke multiple requests to display all pages of the collection for data-products.

Example

ibmcloud dph data-products \
    --limit 10 \
    --start exampleString

Data Product Drafts

Data Product Draft APIs.

ibmcloud dph data-product-drafts

Retrieve a list of data product drafts. Note: If the --all-pages option is not set, the command will only retrieve a single page of the collection.

ibmcloud dph data-product-drafts --data-product-id DATA-PRODUCT-ID [--asset-container-id ASSET-CONTAINER-ID] [--version VERSION] [--limit LIMIT] [--start START]

Aliases

data-product-drafts, drafts

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--asset-container-id (string)

Filter the list of data product drafts by container id.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--version (string)

Filter the list of data product drafts by version number.

The maximum length is 36 characters. The minimum length is 5 characters. The value must match regular expression /^[\\d]+.[\\d]+.[\\d]+$/.

--limit (int64)

Limit the number of data product drafts in the results. The maximum limit is 200.

The default value is 200. The maximum value is 200. The minimum value is 1.

--start (string)

Start token for pagination.

The maximum length is 512 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--all-pages (bool)

Invoke multiple requests to display all pages of the collection for data-product-drafts.

Example

ibmcloud dph data-product-drafts \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --asset-container-id exampleString \
    --version exampleString \
    --limit 10 \
    --start exampleString

Data Product Releases

Data Product Release APIs.

ibmcloud dph data-product-releases

Retrieve a list of data product releases. Note: If the --all-pages option is not set, the command will only retrieve a single page of the collection.

ibmcloud dph data-product-releases --data-product-id DATA-PRODUCT-ID [--asset-container-id ASSET-CONTAINER-ID] [--state STATE] [--version VERSION] [--limit LIMIT] [--start START]

Aliases

data-product-releases, releases

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--asset-container-id (string)

Filter the list of data product releases by container id.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--state ([]string)

Filter the list of data product versions by state. States are: available and retired. Default is "available","retired".

Allowable list items are: available, retired. The maximum length is 2 items. The minimum length is 0 items.

--version (string)

Filter the list of data product releases by version number.

The maximum length is 36 characters. The minimum length is 5 characters. The value must match regular expression /^[\\d]+.[\\d]+.[\\d]+$/.

--limit (int64)

Limit the number of data product releases in the results. The maximum is 200.

The default value is 200. The maximum value is 200. The minimum value is 1.

--start (string)

Start token for pagination.

The maximum length is 512 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--all-pages (bool)

Invoke multiple requests to display all pages of the collection for data-product-releases.

Example

ibmcloud dph data-product-releases \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --asset-container-id exampleString \
    --state available,retired \
    --version exampleString \
    --limit 10 \
    --start exampleString

config

Commands for Config resource.

ibmcloud dph config --help

ibmcloud dph config show

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.

ibmcloud dph config show [--container-id CONTAINER-ID]

Command options

--container-id (string)

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.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph config show \
    --container-id exampleString

ibmcloud dph config initialize

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 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 Data Product Hub


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

ibmcloud dph config initialize [--container CONTAINER | --container-id CONTAINER-ID --container-type CONTAINER-TYPE] [--include INCLUDE]

Command options

--container (ContainerReference)

Data Product Hub container. This JSON option can instead be provided by setting individual fields with other options. It is mutually exclusive with those options.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --container=@path/to/file.json.

--include ([]string)

List of configuration options to (re-)initialize.

Allowable list items are: delivery_methods, domains_multi_industry, workflows, data_product_samples. The maximum length is 4 items. The minimum length is 1 item.

--container-id (string)

Container identifier. This option provides a value for a sub-field of the JSON option 'container'. It is mutually exclusive with that option.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--container-type (string)

Container type. This option provides a value for a sub-field of the JSON option 'container'. It is mutually exclusive with that option.

The default value is catalog. Allowable values are: catalog.

Examples

ibmcloud dph config initialize \
    --container '{"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}' \
    --include delivery_methods,domains_multi_industry,workflows,data_product_samples

Alternatively, granular options are available for the sub-fields of JSON string options:

ibmcloud dph config initialize \
    --include delivery_methods,domains_multi_industry,workflows,data_product_samples \
    --container-id d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --container-type catalog

ibmcloud dph config apikey-rotate

Use this API to manage API keys for Data Product Hub.

You can do:

  • rotate - rotate API keys for Data Product Hub


.

ibmcloud dph config apikey-rotate --rotate ROTATE

Command options

--rotate ([]string)

List of api keys to be rotated. Required.

Allowable list items are: data_product_admin_service_id. The maximum length is 3 items. The minimum length is 1 item.

Example

ibmcloud dph config apikey-rotate \
    --rotate data_product_admin_service_id

terms-doc

Commands for TermsDoc resource.

ibmcloud dph terms-doc --help

ibmcloud dph terms-doc complete

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.
ibmcloud dph terms-doc complete --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID --contract-terms-id CONTRACT-TERMS-ID --document-id DOCUMENT-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--contract-terms-id (string)

Contract terms id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--document-id (string)

Document id. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph terms-doc complete \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --contract-terms-id 598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82 \
    --document-id exampleString

ibmcloud dph terms-doc upload

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.
ibmcloud dph terms-doc upload --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID --contract-terms-id CONTRACT-TERMS-ID --type TYPE --name NAME --id ID [--url URL] [--attachment ATTACHMENT | --attachment-id ATTACHMENT-ID]

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--contract-terms-id (string)

Contract terms id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--type (string)

Type of the contract document. Required.

Allowable values are: terms_and_conditions, sla.

--name (string)

Name of the contract document. Required.

The maximum length is 256 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--id (string)

Id uniquely identifying this document within the contract terms instance. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--url (string)

URL that can be used to retrieve the contract document.

The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^https?:\/\/[^\\s<>]+$/.

--attachment (ContractTermsDocumentAttachment)

Attachment associated witht the document. This JSON option can instead be provided by setting individual fields with other options. It is mutually exclusive with those options.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --attachment=@path/to/file.json.

--attachment-id (string)

Id representing the corresponding attachment. This option provides a value for a sub-field of the JSON option 'attachment'. It is mutually exclusive with that option.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

Examples

ibmcloud dph terms-doc upload \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --contract-terms-id 598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82 \
    --type terms_and_conditions \
    --name 'Terms and conditions document' \
    --id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --url exampleString \
    --attachment '{"id": "exampleString"}'

Alternatively, granular options are available for the sub-fields of JSON string options:

ibmcloud dph terms-doc upload \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --contract-terms-id 598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82 \
    --type terms_and_conditions \
    --name 'Terms and conditions document' \
    --id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --url exampleString \
    --attachment-id exampleString

dph terms-doc show

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.

ibmcloud dph terms-doc show --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID --contract-terms-id CONTRACT-TERMS-ID --document-id DOCUMENT-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--contract-terms-id (string)

Contract terms id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--document-id (string)

Document id. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph terms-doc show \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --contract-terms-id 598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82 \
    --document-id exampleString

ibmcloud dph terms-doc delete

Delete an existing contract document.

Contract documents can only be deleted for data product versions that are in DRAFT state.

ibmcloud dph terms-doc delete --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID --contract-terms-id CONTRACT-TERMS-ID --document-id DOCUMENT-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--contract-terms-id (string)

Contract terms id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--document-id (string)

Document id. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph terms-doc delete \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --contract-terms-id 598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82 \
    --document-id exampleString

ibmcloud dph terms-doc update

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.
ibmcloud dph terms-doc update --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID --contract-terms-id CONTRACT-TERMS-ID --document-id DOCUMENT-ID --json-patch-instructions JSON-PATCH-INSTRUCTIONS

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--contract-terms-id (string)

Contract terms id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--document-id (string)

Document id. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--json-patch-instructions (JSONPatchOperation[])

A set of patch operations as defined in RFC 6902. See http://jsonpatch.com/ for more information. Required.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --json-patch-instructions=@path/to/file.json.

Example

ibmcloud dph terms-doc update \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --contract-terms-id 598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82 \
    --document-id exampleString \
    --json-patch-instructions '[{"op": "add", "path": "exampleString", "from": "exampleString", "value": "exampleString"}]'

draft

Commands for Draft resource.

ibmcloud dph draft --help

ibmcloud dph draft create

Create a new draft of an existing data product.

ibmcloud dph draft create --data-product-id DATA-PRODUCT-ID [--container CONTAINER | --container-id CONTAINER-ID --container-type CONTAINER-TYPE] [--version VERSION] [--state STATE] [--data-product DATA-PRODUCT] [--name NAME] [--description DESCRIPTION] [--tags TAGS] [--use-cases USE-CASES] [--domain DOMAIN | --domain-id DOMAIN-ID --domain-name DOMAIN-NAME --domain-container DOMAIN-CONTAINER] [--type TYPE] [--parts-out PARTS-OUT] [--contract-terms CONTRACT-TERMS] [--is-restricted IS-RESTRICTED]

Command options

--data-product-id (string)

Data product ID. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--container (ContainerReference)

Data Product Hub container. This JSON option can instead be provided by setting individual fields with other options. It is mutually exclusive with those options.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --container=@path/to/file.json.

--version (string)

The data product version number.

The maximum length is 36 characters. The minimum length is 5 characters. The value must match regular expression /^[\\d]+.[\\d]+.[\\d]+$/.

--state (string)

The state of the data product version. If not specified, the data product version will be created in draft state.

Allowable values are: draft, available, retired.

--data-product (DataProductIdentity)

Data product identifier. This JSON option can instead be provided by setting individual fields with other options. It is mutually exclusive with those options.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --data-product=@path/to/file.json.

--name (string)

The name that refers to the new data product version. If this is a new data product, this value must be specified. If this is a new version of an existing data product, the name will default to the name of the previous data product version. A name can contain letters, numbers, understores, dashes, spaces or periods. A name must contain at least one non-space character.

The maximum length is 256 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--description (string)

Description of the data product version. If this is a new version of an existing data product, the description will default to the description of the previous version of the data product.

The maximum length is 4000 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--tags ([]string)

Tags on the new data product version. If this is the first version of a data product, tags defaults to an empty list. If this is a new version of an existing data product, tags will default to the list of tags on the previous version of the data product.

The list items must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/. The maximum length is 1000 items. The minimum length is 0 items.

--use-cases (UseCase[])

Use cases that the data product version serves. If this is the first version of a data product, use cases defaults to an empty list. If this is a new version of an existing data product, use cases will default to the list of use cases on the previous version of the data product.

The maximum length is 1000 items. The minimum length is 0 items.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --use-cases=@path/to/file.json.

--domain (Domain)

Domain that the data product version belongs to. If this is the first version of a data product, this field is required. If this is a new version of an existing data product, the domain will default to the domain of the previous version of the data product. This JSON option can instead be provided by setting individual fields with other options. It is mutually exclusive with those options.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --domain=@path/to/file.json.

--type ([]string)

The types of the parts included in this data product version. If this is the first version of a data product, this field defaults to an empty list. If this is a new version of an existing data product, the types will default to the types of the previous version of the data product.

Allowable list items are: data, code. The maximum length is 1000 items. The minimum length is 0 items.

--parts-out (DataProductPart[])

The outgoing parts of this data product version to be delivered to consumers. If this is the first version of a data product, this field defaults to an empty list. If this is a new version of an existing data product, the data product parts will default to the parts list from the previous version of the data product.

The maximum length is 1000 items. The minimum length is 0 items.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --parts-out=@path/to/file.json.

--contract-terms (DataProductContractTerms[])

The contract terms that bind interactions with this data product version.

The maximum length is 1000 items. The minimum length is 0 items.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --contract-terms=@path/to/file.json.

--is-restricted (bool)

Indicates whether the data product is restricted or not. A restricted data product indicates that orders of the data product requires explicit approval before data is delivered.

--container-id (string)

Container identifier. This option provides a value for a sub-field of the JSON option 'container'. It is mutually exclusive with that option.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--container-type (string)

Container type. This option provides a value for a sub-field of the JSON option 'container'. It is mutually exclusive with that option.

The default value is catalog. Allowable values are: catalog.

--domain-id (string)

The ID of the domain. This option provides a value for a sub-field of the JSON option 'domain'. It is mutually exclusive with that option.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--domain-name (string)

The display name of the domain. This option provides a value for a sub-field of the JSON option 'domain'. It is mutually exclusive with that option.

The maximum length is 256 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--domain-container (ContainerReference)

Data Product Hub container. This option provides a value for a sub-field of the JSON option 'domain'. It is mutually exclusive with that option.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --domain-container=@path/to/file.json.

Examples

ibmcloud dph draft create \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --container '{"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}' \
    --version 1.2.0 \
    --state draft \
    --data-product '{"id": "b38df608-d34b-4d58-8136-ed25e6c6684e"}' \
    --name exampleString \
    --description exampleString \
    --tags exampleString,anotherTestString \
    --use-cases '[{"id": "exampleString", "name": "exampleString", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}]' \
    --domain '{"id": "exampleString", "name": "exampleString", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}' \
    --type data,code \
    --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-07-01T22:22:34.876Z", "delivery_methods": [{"id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}]}]' \
    --contract-terms '[{"asset": {"id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}, "id": "exampleString", "documents": [{"url": "exampleString", "type": "terms_and_conditions", "name": "exampleString", "id": "2b0bf220-079c-11ee-be56-0242ac120002", "attachment": {"id": "exampleString"}}]}]' \
    --is-restricted true

Alternatively, granular options are available for the sub-fields of JSON string options:

ibmcloud dph draft create \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --version 1.2.0 \
    --state draft \
    --name exampleString \
    --description exampleString \
    --tags exampleString,anotherTestString \
    --use-cases '[useCase]' \
    --type data,code \
    --parts-out '[dataProductPart]' \
    --contract-terms '[dataProductContractTerms]' \
    --is-restricted true \
    --container-id d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --container-type catalog \
    --domain-id exampleString \
    --domain-name exampleString \
    --domain-container containerReference

ibmcloud dph draft show

Get a draft of an existing data product.

ibmcloud dph draft show --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph draft show \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd

ibmcloud dph draft delete

Delete a data product draft identified by a valid ID.

ibmcloud dph draft delete --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph draft delete \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd

ibmcloud dph draft update

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

.

ibmcloud dph draft update --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID --json-patch-instructions JSON-PATCH-INSTRUCTIONS

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--json-patch-instructions (JSONPatchOperation[])

A set of patch operations as defined in RFC 6902. See http://jsonpatch.com/ for more information. Required.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --json-patch-instructions=@path/to/file.json.

Example

ibmcloud dph draft update \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --json-patch-instructions '[{"op": "add", "path": "exampleString", "from": "exampleString", "value": "exampleString"}]'

ibmcloud dph draft publish

Publish a draft of an existing data product.

ibmcloud dph draft publish --data-product-id DATA-PRODUCT-ID --draft-id DRAFT-ID [--async ASYNC]

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--draft-id (string)

Data product draft id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--async (bool)

Whether to perform the publish operation in the background after validating the request.

Example

ibmcloud dph draft publish \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --draft-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --async true

release

Commands for Release resource.

ibmcloud dph release --help

ibmcloud dph release show

Get a release of an existing data product.

ibmcloud dph release show --data-product-id DATA-PRODUCT-ID --release-id RELEASE-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--release-id (string)

Data product release id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph release show \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --release-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd

ibmcloud dph release update

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

.

ibmcloud dph release update --data-product-id DATA-PRODUCT-ID --release-id RELEASE-ID --json-patch-instructions JSON-PATCH-INSTRUCTIONS

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--release-id (string)

Data product release id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--json-patch-instructions (JSONPatchOperation[])

A set of patch operations as defined in RFC 6902. See http://jsonpatch.com/ for more information. Required.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --json-patch-instructions=@path/to/file.json.

Example

ibmcloud dph release update \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --release-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --json-patch-instructions '[{"op": "add", "path": "exampleString", "from": "exampleString", "value": "exampleString"}]'

ibmcloud dph release terms-doc

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.

ibmcloud dph release terms-doc --data-product-id DATA-PRODUCT-ID --release-id RELEASE-ID --contract-terms-id CONTRACT-TERMS-ID --document-id DOCUMENT-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--release-id (string)

Data product release id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--contract-terms-id (string)

Contract terms id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

--document-id (string)

Document id. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph release terms-doc \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --release-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd \
    --contract-terms-id 598183cd-b910-4e8d-9a97-97097afda3c1@e4fe2f87-0e56-46dd-b3b8-e9af32309e82 \
    --document-id exampleString

ibmcloud dph release retire

Retire a release of an existing data product.

ibmcloud dph release retire --data-product-id DATA-PRODUCT-ID --release-id RELEASE-ID

Command options

--data-product-id (string)

Data product ID. Use '-' to skip specifying the data product ID explicitly. Required.

The maximum length is 36 characters. The minimum length is 1 character. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

--release-id (string)

Data product release id. Required.

The maximum length is 73 characters. The minimum length is 73 characters. The value must match regular expression /^[\\w\\.,:$&@\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph release retire \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e \
    --release-id 2b0bf220-079c-11ee-be56-0242ac120002@d29c42eb-7100-4b7a-8257-c196dbcca1cd

data-product

Commands for Data Product resource.

ibmcloud dph data-product --help

ibmcloud dph data-product create

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.

ibmcloud dph data-product create --drafts DRAFTS

Command options

--drafts (DataProductVersionPrototype[])

Collection of data products drafts to add to data product. Required.

The maximum length is 1 item. The minimum length is 0 items.

Provide a JSON string option or specify a JSON file to read from by providing a filepath option that begins with a @, e.g. --drafts=@path/to/file.json.

Example

ibmcloud dph data-product create \
    --drafts '[{"version": "1.0.0", "state": "draft", "data_product": {"id": "b38df608-d34b-4d58-8136-ed25e6c6684e"}, "name": "My New Data Product", "description": "This is a description of My Data Product.", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}, "tags": ["exampleString","anotherTestString"], "use_cases": [{"id": "exampleString", "name": "exampleString", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}], "domain": {"id": "exampleString", "name": "exampleString", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}, "type": ["data","code"], "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-07-01T22:22:34.876Z", "delivery_methods": [{"id": "09cf5fcc-cb9d-4995-a8e4-16517b25229f", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}]}], "contract_terms": [{"asset": {"id": "2b0bf220-079c-11ee-be56-0242ac120002", "container": {"id": "d29c42eb-7100-4b7a-8257-c196dbcca1cd", "type": "catalog"}}, "id": "exampleString", "documents": [{"url": "exampleString", "type": "terms_and_conditions", "name": "exampleString", "id": "2b0bf220-079c-11ee-be56-0242ac120002", "attachment": {"id": "exampleString"}}]}], "is_restricted": true}]'

ibmcloud dph data-product show

Retrieve a data product identified by id.

ibmcloud dph data-product show --data-product-id DATA-PRODUCT-ID

Command options

--data-product-id (string)

Data product ID. Required.

The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[\\w\\.,:$&\\(\\)\\s\\-\\_\\^"]+$/.

Example

ibmcloud dph data-product show \
    --data-product-id b38df608-d34b-4d58-8136-ed25e6c6684e

Schema examples

The following schema examples represent the data that you need to specify for a command option. These examples model the data structure and include placeholder values for the expected value type. When you run a command, replace these values with the values that apply to your environment as appropriate.

ContainerReference

The following example shows the format of the ContainerReference object.


{
  "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
  "type" : "catalog"
}

ContractTermsDocumentAttachment

The following example shows the format of the ContractTermsDocumentAttachment object.


{
  "id" : "exampleString"
}

DataProductContractTerms[]

The following example shows the format of the DataProductContractTerms[] object.


[ {
  "asset" : {
    "id" : "2b0bf220-079c-11ee-be56-0242ac120002",
    "container" : {
      "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
      "type" : "catalog"
    }
  },
  "id" : "exampleString",
  "documents" : [ {
    "url" : "exampleString",
    "type" : "terms_and_conditions",
    "name" : "exampleString",
    "id" : "2b0bf220-079c-11ee-be56-0242ac120002",
    "attachment" : {
      "id" : "exampleString"
    }
  } ]
} ]

DataProductIdentity

The following example shows the format of the DataProductIdentity object.


{
  "id" : "b38df608-d34b-4d58-8136-ed25e6c6684e"
}

DataProductPart[]

The following example shows the format of the DataProductPart[] object.


[ {
  "asset" : {
    "id" : "2b0bf220-079c-11ee-be56-0242ac120002",
    "container" : {
      "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
      "type" : "catalog"
    },
    "type" : "data_asset"
  },
  "revision" : 1,
  "updated_at" : "2023-07-01T22:22:34.876Z",
  "delivery_methods" : [ {
    "id" : "09cf5fcc-cb9d-4995-a8e4-16517b25229f",
    "container" : {
      "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
      "type" : "catalog"
    }
  } ]
} ]

DataProductVersionPrototype[]

The following example shows the format of the DataProductVersionPrototype[] object.


[ {
  "version" : "1.0.0",
  "state" : "draft",
  "data_product" : {
    "id" : "b38df608-d34b-4d58-8136-ed25e6c6684e"
  },
  "name" : "My New Data Product",
  "description" : "This is a description of My Data Product.",
  "container" : {
    "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
    "type" : "catalog"
  },
  "tags" : [ "exampleString", "anotherExampleString" ],
  "use_cases" : [ {
    "id" : "exampleString",
    "name" : "exampleString",
    "container" : {
      "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
      "type" : "catalog"
    }
  } ],
  "domain" : {
    "id" : "exampleString",
    "name" : "exampleString",
    "container" : {
      "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
      "type" : "catalog"
    }
  },
  "type" : [ "data", "code" ],
  "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-07-01T22:22:34.876Z",
    "delivery_methods" : [ {
      "id" : "09cf5fcc-cb9d-4995-a8e4-16517b25229f",
      "container" : {
        "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
        "type" : "catalog"
      }
    } ]
  } ],
  "contract_terms" : [ {
    "asset" : {
      "id" : "2b0bf220-079c-11ee-be56-0242ac120002",
      "container" : {
        "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
        "type" : "catalog"
      }
    },
    "id" : "exampleString",
    "documents" : [ {
      "url" : "exampleString",
      "type" : "terms_and_conditions",
      "name" : "exampleString",
      "id" : "2b0bf220-079c-11ee-be56-0242ac120002",
      "attachment" : {
        "id" : "exampleString"
      }
    } ]
  } ],
  "is_restricted" : true
} ]

Domain

The following example shows the format of the Domain object.


{
  "id" : "exampleString",
  "name" : "exampleString",
  "container" : {
    "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
    "type" : "catalog"
  }
}

JSONPatchOperation[]

The following example shows the format of the JSONPatchOperation[] object.


[ {
  "op" : "add",
  "path" : "exampleString",
  "from" : "exampleString",
  "value" : "exampleString"
} ]

UseCase[]

The following example shows the format of the UseCase[] object.


[ {
  "id" : "exampleString",
  "name" : "exampleString",
  "container" : {
    "id" : "d29c42eb-7100-4b7a-8257-c196dbcca1cd",
    "type" : "catalog"
  }
} ]