Promote an environment to primary
Returns
Returns a
environment resource object.
Examples
Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const environmentId = 'main';
const environment = await client.environments.promote(environmentId);
console.log(environment);
}
run();