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

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

Type Alias: ScapiSchemasClient

ScapiSchemasClient = Client<paths>

Defined in: packages/b2c-tooling-sdk/src/clients/scapi-schemas.ts:67

The typed SCAPI Schemas client for discovering available SCAPI APIs.

Common Endpoints

MethodPathDescription
GET/organizations/{organizationId}/schemasList available schemas
GET/organizations/{organizationId}/schemas/{apiFamily}/{apiName}/{apiVersion}Get specific schema

Example

typescript
import { createScapiSchemasClient, toOrganizationId } 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 = createScapiSchemasClient(
  { shortCode: 'kv7kzm78', tenantId: 'zzxy_prd' },
  auth
);

// List all available SCAPI schemas
const { data, error } = await client.GET('/organizations/{organizationId}/schemas', {
  params: { path: { organizationId: toOrganizationId('zzxy_prd') } }
});

See

Released under the Apache-2.0 License.