Choose your language:
    List all workflows
    Returns
    Returns an array of workflow objects.

    Examples

    Example code:
    const { SiteClient } = require('datocms-client');
    async function run() {
    const client = new SiteClient('YOUR-API-TOKEN');
    const workflows = await client.workflows.all();
    workflows.forEach((workflow) => {
    console.log(workflow);
    });
    }
    run();
    Returned output:
    > node example.js
    {
    "id": "approval_by_editors",
    "name": "Approval by editors required",
    "stages": [
    {
    "id": "waiting_for_review",
    "name": "Waiting for review",
    "initial": true
    }
    ]
    }