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

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

Function: getProject()

getProject(options, auth): Promise<{ }>

Defined in: packages/b2c-tooling-sdk/src/operations/mrt/project.ts:284

Gets a project by slug.

Parameters

options

GetProjectOptions

Get options

auth

AuthStrategy

Authentication strategy (ApiKeyStrategy)

Returns

Promise<{ }>

The project

Throws

Error if request fails

Example

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

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

const project = await getProject({ projectSlug: 'my-storefront' }, auth);
console.log(`Project: ${project.name}`);

Released under the Apache-2.0 License.