@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
| Method | Path | Description |
|---|---|---|
| GET | /sandboxes | List all sandboxes |
| POST | /sandboxes | Create a new sandbox |
| GET | /sandboxes/{sandboxId} | Get sandbox details |
| DELETE | /sandboxes/{sandboxId} | Delete a sandbox |
| POST | /sandboxes/{sandboxId}/operations | Start/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
- createOdsClient for instantiation
- ODS REST API Reference