Show examples in:
    Activate maintenance mode: this means that the primary environment will be read-only

    Query parameters

    force  Optional  boolean  Example: true

    Force the activation, even if there are collaborators editing some records.

    Returns

    Returns a maintenance_mode resource object.

    Examples

    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const maintenanceMode = await client.maintenanceMode.activate();
    console.log(maintenanceMode);
    }
    run();