b2_c_commerce_developer_sandbox_rest_api
B2CCommerceDeveloperSandboxRestApi - JavaScript client for b2_c_commerce_developer_sandbox_rest_api B2C Commerce provides a REST API to manage developer sandboxes. The API allows you to create, manage, and delete developer sandboxes. This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0
- Package version: 1.0
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://help.salesforce.com/articleView?id=000312388&language=en_US&type=1&mode=1
Installation
Node.js
Fornpm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install b2_c_commerce_developer_sandbox_rest_api --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your b2_c_commerce_developer_sandbox_rest_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('b2_c_commerce_developer_sandbox_rest_api')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/b2_c_commerce_developer_sandbox_rest_api then install it via:
npm install YOUR_USERNAME/b2_c_commerce_developer_sandbox_rest_api --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var B2CCommerceDeveloperSandboxRestApi = require('b2_c_commerce_developer_sandbox_rest_api');
var defaultClient = B2CCommerceDeveloperSandboxRestApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: AccountManager
var AccountManager = defaultClient.authentications['AccountManager'];
AccountManager.accessToken = "YOUR ACCESS TOKEN"
var api = new B2CCommerceDeveloperSandboxRestApi.CommonApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.meGet(callback);
Documentation for API Endpoints
All URIs are relative to https://localhost/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
B2CCommerceDeveloperSandboxRestApi.CommonApi | meGet | GET /me | Retrieve user information. |
B2CCommerceDeveloperSandboxRestApi.CommonApi | rootGet | GET / | Retrieve API information. |
B2CCommerceDeveloperSandboxRestApi.CommonApi | systemGet | GET /system | Retrieve system information |
B2CCommerceDeveloperSandboxRestApi.RealmsApi | realmsRealmConfigurationGet | GET /realms/{realm}/configuration | Show realm configuration. |
B2CCommerceDeveloperSandboxRestApi.RealmsApi | realmsRealmConfigurationPatch | PATCH /realms/{realm}/configuration | Update realm configuration. |
B2CCommerceDeveloperSandboxRestApi.RealmsApi | realmsRealmGet | GET /realms/{realm} | Show realm information. |
B2CCommerceDeveloperSandboxRestApi.RealmsApi | realmsRealmUsageGet | GET /realms/{realm}/usage | Show usage information for realm. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesGet | GET /sandboxes | List sandboxes. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesPost | POST /sandboxes | Create sandbox. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdAliasesGet | GET /sandboxes/{sandboxId}/aliases | Read all sandbox aliases |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdAliasesPost | POST /sandboxes/{sandboxId}/aliases | Create sandbox alias. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdAliasesSandboxAliasIdDelete | DELETE /sandboxes/{sandboxId}/aliases/{sandboxAliasId} | Delete Alias configuration |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdAliasesSandboxAliasIdGet | GET /sandboxes/{sandboxId}/aliases/{sandboxAliasId} | Read Alias configuration |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdDelete | DELETE /sandboxes/{sandboxId} | Delete sandbox. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdGet | GET /sandboxes/{sandboxId} | Retrieve sandbox information. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdOperationsGet | GET /sandboxes/{sandboxId}/operations | List sandbox operations. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdOperationsOperationIdGet | GET /sandboxes/{sandboxId}/operations/{operationId} | Retrieve sandbox operation. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdOperationsPost | POST /sandboxes/{sandboxId}/operations | Run sandbox operation. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdPatch | PATCH /sandboxes/{sandboxId} | Update sandbox. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdSettingsGet | GET /sandboxes/{sandboxId}/settings | Show sandbox settings. |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdStorageGet | GET /sandboxes/{sandboxId}/storage | Show sandbox storage |
B2CCommerceDeveloperSandboxRestApi.SandboxesApi | sandboxesSandboxIdUsageGet | GET /sandboxes/{sandboxId}/usage | Show sandbox usage. |
Documentation for Models
- B2CCommerceDeveloperSandboxRestApi.ApiVersion
- B2CCommerceDeveloperSandboxRestApi.ApiVersionBuild
- B2CCommerceDeveloperSandboxRestApi.ApiVersionGit
- B2CCommerceDeveloperSandboxRestApi.ApiVersionResponse
- B2CCommerceDeveloperSandboxRestApi.ConfigurationIntegerValue
- B2CCommerceDeveloperSandboxRestApi.ErrorModel
- B2CCommerceDeveloperSandboxRestApi.ErrorResponse
- B2CCommerceDeveloperSandboxRestApi.OcapiSettings
- B2CCommerceDeveloperSandboxRestApi.OcapiSettingsInner
- B2CCommerceDeveloperSandboxRestApi.OcapiSettingsInnerResources
- B2CCommerceDeveloperSandboxRestApi.OcapiSettingsInnerVersionRange
- B2CCommerceDeveloperSandboxRestApi.PagedResponse
- B2CCommerceDeveloperSandboxRestApi.PagingLinks
- B2CCommerceDeveloperSandboxRestApi.PagingMetadata
- B2CCommerceDeveloperSandboxRestApi.RealmConfigurationModel
- B2CCommerceDeveloperSandboxRestApi.RealmConfigurationResponse
- B2CCommerceDeveloperSandboxRestApi.RealmConfigurationUpdateRequestModel
- B2CCommerceDeveloperSandboxRestApi.RealmModel
- B2CCommerceDeveloperSandboxRestApi.RealmRequestConfigurationModel
- B2CCommerceDeveloperSandboxRestApi.RealmResponse
- B2CCommerceDeveloperSandboxRestApi.RealmSandboxConfigurationModel
- B2CCommerceDeveloperSandboxRestApi.RealmSandboxConfigurationUpdateModel
- B2CCommerceDeveloperSandboxRestApi.RealmUsageModel
- B2CCommerceDeveloperSandboxRestApi.RealmUsageResponse
- B2CCommerceDeveloperSandboxRestApi.RealmUsageSummaryModel
- B2CCommerceDeveloperSandboxRestApi.Response
- B2CCommerceDeveloperSandboxRestApi.SandboxAliasListResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxAliasModel
- B2CCommerceDeveloperSandboxRestApi.SandboxAliasModelCookie
- B2CCommerceDeveloperSandboxRestApi.SandboxAliasResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxListResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxModel
- B2CCommerceDeveloperSandboxRestApi.SandboxModelLinks
- B2CCommerceDeveloperSandboxRestApi.SandboxModelVersions
- B2CCommerceDeveloperSandboxRestApi.SandboxOperationListResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxOperationModel
- B2CCommerceDeveloperSandboxRestApi.SandboxOperationRequestModel
- B2CCommerceDeveloperSandboxRestApi.SandboxOperationResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxProvisioningRequestModel
- B2CCommerceDeveloperSandboxRestApi.SandboxResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxSettings
- B2CCommerceDeveloperSandboxRestApi.SandboxSettingsResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxState
- B2CCommerceDeveloperSandboxRestApi.SandboxStorageModel
- B2CCommerceDeveloperSandboxRestApi.SandboxStorageResponse
- B2CCommerceDeveloperSandboxRestApi.SandboxUpdateRequestModel
- B2CCommerceDeveloperSandboxRestApi.SandboxUsageModel
- B2CCommerceDeveloperSandboxRestApi.SandboxUsageModelHistory
- B2CCommerceDeveloperSandboxRestApi.SandboxUsageResponse
- B2CCommerceDeveloperSandboxRestApi.StatusResponse
- B2CCommerceDeveloperSandboxRestApi.StorageUsageModel
- B2CCommerceDeveloperSandboxRestApi.SystemInfoResponse
- B2CCommerceDeveloperSandboxRestApi.SystemInfoSpec
- B2CCommerceDeveloperSandboxRestApi.UserInfoResponse
- B2CCommerceDeveloperSandboxRestApi.UserInfoSpec
- B2CCommerceDeveloperSandboxRestApi.UserInfoSpecClient
- B2CCommerceDeveloperSandboxRestApi.UserInfoSpecUser
- B2CCommerceDeveloperSandboxRestApi.WebDavSettings
- B2CCommerceDeveloperSandboxRestApi.WebDavSettingsInner
- B2CCommerceDeveloperSandboxRestApi.WebDavSettingsInnerPermissions
Documentation for Authorization
AccountManager
- Type: OAuth
- Flow: implicit
- Authorization URL: https://account.demandware.com:443/dwsso/oauth2/authorize
- Scopes: N/A