Managing Data Marketplace Contexts via the Command Line

You can use the SAP Datasphere command line interface, datasphere, to create and manage Data Marketplace contexts.

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---S) - To create, edit and delete data providers.

  • Space Files (CRUD----) - To create, read, update, and delete marketplace 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 Roles Delivered with SAP Datasphere.
You must, in addition:

Use contexts to restrict the visibility of your data provider profile and your data products to selected users only. For more information about Data Marketplace contexts, see Using Contexts to Realize Public, Private, and Internal Offers.

datasphere marketplace contexts-by-provider list

Returns a list of contexts for a data provider.

datasphere marketplace contexts-by-provider list

Parameter

Description

--accept <accept>

Format to return the content in.

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

  • application/vnd.sap.marketplace.contexts.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 contexts-by-provider create

Creates a new context for a specified data provider, based on a configuration following the context definition file format and stored as a .json file. For more information, see the Data Sharing CockpitInformation published on SAP site documentation in the SAP Business Accelerator Hub.

datasphere marketplace contexts-by-provider create

Specify the full path to the input .json file, for example C:\temp\mycontextdefinition.json.

The new context is created in status Draft. You can activate the context with the command datasphere marketplace context-by-provider change-lifecycle-status.

Parameter

Description

--file-path <path>

Enter a path to a file with a .json extension containing your context 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 contexts-by-provider read

Lists the properties of a context for a specific data provider. You must specify the context UUID and the data provider UUID.

datasphere marketplace contexts-by-provider read

Parameter

Description

--context-identifier <context-identifier>

Context 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 contexts-by-provider update

Updates selected properties of a specified context, based on a configuration following the context definition file format and stored as a .json file. For more information, see the Data Sharing CockpitInformation published on SAP site documentation in the SAP Business Accelerator Hub.

datasphere marketplace contexts-by-provider update

Parameter

Description

--file-path <path>

Enter a path to a file with a .json extension containing your context 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" ]”

--context-identifier <context-identifier>

Context UUID.

datasphere marketplace contexts-by-provider overwrite

Overwrites all properties of the specified context with the provided data in the context definition file. For more information, see the Data Sharing CockpitInformation published on SAP site documentation in the SAP Business Accelerator Hub.

datasphere marketplace contexts-by-provider overwrite

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

--context-identifier <context-identifier>

Context UUID.

--file-path <path>

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

--input <input>

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

datasphere marketplace contexts-by-provider delete

Deletes an existing context of a specified data provider.

datasphere marketplace contexts-by-provider 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" ]”

--context-identifier <context-identifier>

Context UUID.

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

Changes the lifecycle status of a context to Active. A newly created context is automatically set to status Draft: before consumers can use their activation keys to join a context in the Data Marketplace, you have to activate the context.

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

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

--context-identifier <context-identifier>

Context UUID.

datasphere marketplace contexts-by-provider join

With this command you join an existing context, based on a configuration following the context definition file format and stored as a .json file. For more information, see the Data Sharing CockpitInformation published on SAP site documentation in the SAP Business Accelerator Hub. . After joining you can see all data products listed in this context.

datasphere marketplace contexts-by-provider join

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

--file-path <path>

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

--input <input>

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

datasphere marketplace contexts-by-provider leave

With this command you leave a context, based on a configuration following the context definition file format and stored as a .json file. For more information, see the Data Sharing CockpitInformation published on SAP site documentation in the SAP Business Accelerator Hub. . If you leave a context, you won't be able to see the data products listed in this context anymore.

datasphere marketplace contexts-by-provider leave

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

--file-path <path>

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

--input <input>

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

datasphere marketplace contexts-by-provider keys list

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

datasphere marketplace contexts-by-provider keys list

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

--context-identifier <context-identifier>

Context UUID.

datasphere marketplace contexts-by-provider keys generate

Generates activation keys for a specified context, based on a configuration following the context definition file format and stored as a .json file. For more information, see the Data Sharing CockpitInformation published on SAP site documentation in the SAP Business Accelerator Hub. .

datasphere marketplace contexts-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" ]”

--context-identifier <context-identifier>

Context UUID.

--file-path <path>

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

--input <input>

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

datasphere marketplace contexts-by-provider keys delete

Deletes an activation key from a specified context, based on a configuration following the context definition file format and stored as a .json file. For more information, see the Data Sharing CockpitInformation published on SAP site documentation in the SAP Business Accelerator Hub. .

datasphere marketplace contexts-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" ]”

--context-identifier <context-identifier>

Context UUID.

--file-path <path>

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

--input <input>

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