Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / clients / OdsClient

Type Alias: OdsClient

OdsClient = Client<paths>

Defined in: packages/b2c-tooling-sdk/src/clients/ods.ts:65

The typed ODS client for On-Demand Sandbox management.

Common Endpoints

MethodPathDescription
GET/sandboxesList all sandboxes
POST/sandboxesCreate a new sandbox
GET/sandboxes/{sandboxId}Get sandbox details
DELETE/sandboxes/{sandboxId}Delete a sandbox
POST/sandboxes/{sandboxId}/operationsStart/stop a sandbox

Example

typescript
import { createOdsClient } from '@salesforce/b2c-tooling-sdk/clients';
import { OAuthStrategy } from '@salesforce/b2c-tooling-sdk/auth';

const auth = new OAuthStrategy({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
});

const client = createOdsClient({}, auth);

// List all sandboxes
const { data, error } = await client.GET('/sandboxes', {});

See

Released under the Apache-2.0 License.