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

@salesforce/b2c-tooling-sdk / operations/mrt / listDeployments

Function: listDeployments()

listDeployments(options, auth): Promise<ListDeploymentsResult>

Defined in: packages/b2c-tooling-sdk/src/operations/mrt/deployment.ts:109

Lists deployment history for an MRT environment.

Parameters

options

ListDeploymentsOptions

List options including project and target slugs

auth

AuthStrategy

Authentication strategy (ApiKeyStrategy)

Returns

Promise<ListDeploymentsResult>

Paginated list of deployments

Throws

Error if request fails

Example

typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { listDeployments } from '@salesforce/b2c-tooling-sdk/operations/mrt';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

const result = await listDeployments({
  projectSlug: 'my-storefront',
  targetSlug: 'staging'
}, auth);

for (const deploy of result.deployments) {
  console.log(`Bundle ${deploy.bundle_id}: ${deploy.status}`);
}

Released under the Apache-2.0 License.