Managing Data Marketplace Licenses via the Command Line

You can use the SAP Datasphere command line interface, datasphere, to create and manage Data Marketplace licenses in the data sharing cockpit.

Prerequisites

To manage marketplace objects on the command line, you must have a scoped role that grants you access to a space with the following privileges:
  • Data Warehouse General (-R------) - To access SAP Datasphere.

  • Data Warehouse Data Builder (CRUD----) - To create, edit and delete data providers.

  • Space Files (CRUD----) - To create, read, update, and delete objects in your spaces.

  • Spaces (-RU-----) - To modify the space properties.

The DW Space Administrator role template, for example, grants these privileges.For more information, see Privileges and Permissions and Standard Application RolesStandard Roles Delivered with SAP Datasphere.
You must, in addition:

For more information about managing your licenses and generating activation keys for consumers to ensure compliant access to your data products, see Managing Licenses.

datasphere marketplace licenses-by-provider list

Returns a simplified list of all the licenses available for your data provider profile.

datasphere marketplace licenses-by-provider list

Parameter

Description

--accept <accept>

Format to return the content in.

Choices:
  • application/vnd.sap.marketplace.licenses.list+json (default)

  • application/vnd.sap.marketplace.licenses.details+json

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

datasphere marketplace licenses-by-provider create

Creates a new license.

datasphere marketplace licenses-by-provider create

The new license is created in status Draft. You can change the status with the command change-lifecycle-status.

Parameter

Description

--file-path <path>

Enter a path to a file with a .json extension containing your license definition.

--input <input>

Specifies input as string to use for the command (optional).

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

datasphere marketplace licenses-by-provider read

Lists the properties of a license. You must specify the license UUID.

datasphere marketplace licenses-by-provider read

Parameter

Description

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

--license-identifier <license-identifier>

License UUID.

datasphere marketplace licenses-by-provider update

Updates properties of a specified license.

datasphere marketplace licenses-by-provider update

You must specify the license UUID.

Parameter

Description

--file-path <path>

Enter a path to a file with a .json extension containing your license definition.

--input <input>

Specifies input as string to use for the command (optional).

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

datasphere marketplace licenses-by-provider overwrite

Overwrites all the properties of a specified license.

datasphere marketplace licenses-by-provider overwrite

Parameter

Description

--file-path <path>

Enter a path to a file with a .json extension containing your license definition.

--input <input>

Specifies input as string to use for the command (optional).

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

datasphere marketplace licenses-by-provider delete

Deletes an existing license.

datasphere marketplace licenses-by-provider delete

Parameter

Description

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

datasphere marketplace licenses-by-provider change-lifecycle-status

Changes the lifecycle status of a license from Draft to Active, or vice versa. A newly created license is automatically set to status Draft.

datasphere marketplace licenses-by-provider change-lifecycle-status

Select the Active (or Draft) status, then specify the license UUID.

Parameter

Description

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

datasphere marketplace licenses-by-provider keys list

Returns a list of all the existing activation keys for a specified license.

datasphere marketplace licenses-by-provider keys list

Parameter

Description

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

datasphere marketplace licenses-by-provider keys generate

Generates activation keys for a specified license.

datasphere marketplace licenses-by-provider keys generate

Parameter

Description

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

--license-identifier <license-identifier>

License UUID.

--file-path <path>

Enter a path to a file with a .json extension containing the keys.

--input <input>

Specifies input as string to use for the command (optional).

datasphere marketplace licenses-by-provider keys delete

Deletes an activation key from a specified license.

datasphere marketplace licenses-by-provider keys delete

Parameter

Description

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

--license-identifier <license-identifier>

License UUID.

--file-path <path>

Enter a path to a file with a .json extension containing the keys.

--input <input>

Specifies input as string to use for the command (optional).

datasphere marketplace licenses-by-provider products add

Add data products to a license.

Parameter

Description

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

--file-path <path>

Enter a path to a file with a .json extension containing your license definition.

--input <input>

Specifies input as string to use for the command (optional).

datasphere marketplace licenses-by-provider products delete

Remove data products from a license.

Parameter

Description

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

--file-path <path>

Enter a path to a file with a .json extension containing your license definition.

--input <input>

Specifies input as string to use for the command (optional).

datasphere marketplace licenses-by-provider keys assign-users

Assigns users to a license key.

When a consumer installs the product for the first time, the marketplace service verifies the user account's eligibility based on the registered email address. It then generates a key and activates the data product in the background. This allows the consumer to immediately install a data product that requires a license key, without needing to enter the license key.

datasphere marketplace licenses-by-provider keys assign-users

Parameter

Description

--license-identifier <license-identifier>

License UUID.

--provider-identifier <provider-identifier>

Provider identifier.

You can either:
  • Provide the UUID of the data provider or of the content aggregator.

  • Provide the UUID of a content aggregator and a contentAggregatorProviderID separated by a colon.

    Example: List [ "0b0dfe8e-f974-407d-8987-6d863b2c5e83", "f97dfe8e-f9a4-4d2d-8187-ed863bdc5e88:rubix-b2b-risk-assessment-amp-monitoring-solutions-all-cou-rubix-data-sciences" ]”

--filePath <user-file>

Enter a path to a file with a .json extension containing the required information for the users you want to assign (email address, keyUUID, tenant URL).

Sample payload:
[
{
"email" :"john.doe@sap.com",
"keyUUID":"1b9e9f0b-266e-4422-9354-5647c45c5dd5",
"tenantURL": "dwc-master-hc-datama-cons.master.hanacloudservices.cloud.sap"
},
{
"email" :"jane.smith@sap.com",
"keyUUID":"e5faa991-6a16-44a5-8380-a1f168d2b93d",
"tenantURL": "dwc-master-hc-datama-cons2.master.hanacloudservices.cloud.sap"
}
]	                                          
                                        

--input <input>

Specifies input as string to use for the command (optional).