CommerceOps API actions

CommerceOps API actions are described in this section. For descriptions related to the CommerceShops API and CommerceAuthoring API, see the Sitecore Commerce Developer’s Guide.

Action - CleanEnvironment

Completely removes all artifacts from a Commerce Environment. The environment to clean is passed as a Header called "Environment". Passing in an empty Environment completely clears the global environment, which is where metadata for all the environments is stored.

Parameters:

Sample: http://{{ServiceHost}}/{{OpsApi}}/CleanEnvironment()

Action - InitialzeEnvironment

Initializes a specified Commerce Environment from an empty EntityStore, and adds any needed artifacts. Adds any artifacts needed for a specific Commerce Environment

Parameters:

Environment – the name of the Commerce Environment to initialize (string)

Sample: http://{{ServiceHost}}/{{OpsApi}}/InitializeEnvironment(environment='{{Environment}}')

Action - GetEnvironment

Retrieves a single named Commerce Environment.

Parameters:

Environment – the name of the Commerce Environment to initialize (string)

Sample: http://{{ServiceHost}}/{{OpsApi}}/Environments('Entity-CommerceEnvironment-AdventureWorks')

Action - ImportEnvironment

Imports a Commerce Environment from a raw exported environment JSON string. This imports and initializes the metadata for the specified Environment only.

Parameters:

Environment – the name of the Commerce Environment to initialize (string)

Sample: http://{{ServiceHost}}/{{OpsApi}}/ImportEnvironment()

Action - ExportEnvironment

Exports a Commerce Environment to JSON.

Parameters:

Environment – the name of the Commerce Environment to initialize (string)

Sample: http://{{ServiceHost}}/{{OpsApi}}/ExportEnvironment(environmentName='{{Environment}}')

Action - ListEnvironments

Retrieves a list of all known Commerce Environments.

Sample: http://{{ServiceHost}}/{{OpsApi}}/Environments

Action - GetApiRoutes

Retrieves a list of the current API routes.

Sample: http://{{ServiceHost}}/{{OpsApi}}/GetApiRoutes

Action - Bootstrap

Bootstraps the global Commerce Environment from a new empty one. This adds any artifacts that should be created from a freshly installed system.

Sample: http://{{ServiceHost}}/{{OpsApi}}/Bootstrap()