Workflow

Perform workflow actions on bulk content

Changed on

Fires a workflow action on multiple contentlets identified either by a Lucene 'query' or an explicit 'contentletIds' list. If both are supplied, 'query' wins and 'contentletIds' is ignored.

Scheme association is enforced. Contentlets whose workflow scheme does not own the supplied 'workflowActionId' are skipped — they are not processed and are counted in 'skippedCount' on the response, with a 'skipReason' explaining the mismatch. When every input contentlet is skipped, the endpoint returns 422. To bypass scheme association checks (e.g. for System Workflow actions like Move on content from a custom scheme), use PUT /api/v1/workflow/actions/{actionId}/fire instead.

⚠️ Important contract notes:

  • contentletIds despite its name expects inodes, not identifiers. Passing identifiers results in a silent no-op with no error.
  • additionalParams must be present, even when empty ({}). Omitting it returns a 500 NPE.
  • The endpoint is not step-aware: if the action is not valid in a contentlet's current step, the input is dropped silently (no fails[] entry). Verify post-fire state via POST /api/content/_search.
  • PUT /api/v1/workflow/contentlet/actions/bulk/fire and POST /api/v1/workflow/contentlet/actions/_bulkfire behave identically; _bulkfire streams via SSE.
  • For batches larger than a few contentlets, the synchronous response can exceed common client timeouts (e.g. ~15 s for the MCP sandbox). The server-side work typically completes; verify with _search.
put/api/v1/workflow/contentlet/actions/bulk/fire

Request

Request body

querystring

Lucene query that selects the contentlets to act on. Mutually exclusive with 'contentletIds'.

contentletIdsstring[]

Explicit list of contentlet identifiers to act on. Mutually exclusive with 'query'.

workflowActionIdstring required

The workflow action identifier (UUID) to fire. Discover via GET /api/v1/workflow/schemes/{schemeId}/actions or GET /api/v1/workflow/contentlet/{inode}/actions. Not the system action enum value (NEW, EDIT, PUBLISH, …).

Example request

{
  "query": "+contentType:webPageContent +languageId:1",
  "workflowActionId": "ceca4ee9-1b7b-4f21-a5f4-5d8e9b8b8a1d",
  "additionalParams": {
    "additionalParamsMap": {
      "_path_to_move": "//demo.dotcms.com/destination/folder/"
    }
  },
  "popupParamsBean": {
    "additionalParamsMap": {
      "_path_to_move": "//demo.dotcms.com/destination/folder/"
    }
  }
}

Response

Success — at least one contentlet processed.

i18nMessagesMapobject
permissionsstring[]

Changes

    • breaking

      the request property became required

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status