Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Record

Unpublish items in bulk

Body parameters

items Required

Records to unpublish (a maximum of 200 records are allowed per request)

Examples

1
import { buildClient } from "@datocms/cma-client-node";
2
3
async function run() {
4
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
5
6
const item = await client.items.bulkUnpublish({
7
items: [{ type: "item", id: "hWl-mnkWRYmMCSTq4z_piQ" }],
8
});
9
10
// Check the 'Returned output' tab for the result ☝️
11
console.log(item);
12
}
13
14
run();
1
[]