Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Workflow

List all workflows

Returns

Returns an array of resource objects of type workflow

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const workflows = await client.workflows.list();
for (const workflow of workflows) {
// Check the 'Returned output' tab for the result ☝️
console.log(workflow);
}
}
run();
{
id: "uJzC2b6YQg-DW2A5edpQYQ",
name: "Approval by editors required",
stages: [
{ id: "waiting_for_review", name: "Waiting for review", initial: true },
],
api_key: "approval_by_editors",
}