Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Maintenance mode

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

Query parameters

force boolean

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

Returns

Returns a resource object of type maintenance_mode

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const maintenanceMode = await client.maintenanceMode.activate();
// Check the 'Returned output' tab for the result ☝️
console.log(maintenanceMode);
}
run();
{ id: "maintenance_mode", active: false }