CommerceOps API
The CommerceOps API is a subset of the Commerce Service API, intended to support the DevOps role in managing a Sitecore XC implementation. It includes methods to create and manage environments and global policies.
Sample API requests that are included in the Postman DevOps collections exercise CommerceOPS API actions.
CommerceOpsService API
CommerceOps API actions include:
Action |
Description |
---|---|
Bootstrap |
Completely reloads metadata for environments from a source directory (wwwroot/data/environments). For security, this should be done from an internal instance of the Commerce Engine (CommerceOps). Metadata includes global and environment specific policies and policy sets. Note that this does not add or remove any artifacts to the environment. Bootstrapping only updates metadata. Sample:
|
CleanEnvironment |
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. Sample:
|
InitializeEnvironment |
Initializes a specified Commerce environment from an empty EntityStore, and adds needed artifacts. Sample:
|
GetEnvironment |
Retrieves a single named Commerce environment. Sample:
|
ImportEnvironment |
Imports a Commerce environment from a raw exported environment JSON string. This imports and initializes the metadata for the specified environment only. Sample:
|
ExportEnvironment |
Exports a Commerce environment to JSON. Sample:
|
ListEnvironments |
Retrieves a list of all known Commerce environments. Sample:
|
GetApiRoutes |
Retrieves a list of the current API routes. Sample:
|
Actions pertaining to the CommerceShops and CommerceAuthoring APIs are described in the Commerce Developer Reference.