Workflows (change status, or get possible workflow actions)

There are several service lines that work on the same principle. The end points are slightly different but the parameters are the same and depending on the configuration, the possibilities are the same. All details are available in section DAM & DATA API. This page describes the general principle to modify a workflow state or get the list of workflow actions.


In this chapter, the {type of service} should be replaced by

  • dam/data for dam services

  • data for data services

If the service is DAM, the object on which the requests are made must have the configuration tag rest_api_dam_workflow. For data service, the JSON configuration must have the workflow property set to true.

Change the workflow state of a resource

  • verb: POST

  • general form of the URI: /api/rest/{type of service}/{name of the resource type}/workflow/{id of resource}

Parameters are:

  • workflowAction (or action): the name (not localized) or the identifier of the action to apply

  • if the resource is configured in status change mode by identifier (supporting the old workflow management mode), the parameter is called statusId

  • workflow: this parameter is a common alias for workflowAction and statusId

See response sample.

Change the workflow state of several resources

You can apply the same action to several resources by specifying a list of identifiers (comma-separated) instead of a single one. You can also use the query parameter to select the resources on which the action will be applied.

See response sample.

Know the possible actions to change the state of a resource

  • verb: GET

  • general form of the URI: /api/rest/{type of service}/{name of the resource type}/workflow/{id of resource}

See a response sample

For example, with an asset type my_asset_struct id 12345

{server}/api/rest/dam/data/my_asset_struct/workflow/12345

It returns (with debug = false) something like that:

{ "resource": "hexasset", "name": "Asset", "description": null, "response": { "data": { "id": 27, "$uuid": "ag66cdz99rawubcfqj934w6hmo", "$workflowActions": [ { "id": "1", "$uuid": "tbi7gcg8ccok3s4x7apx71xhsdj13tcxrg1pkya", "name": "publish", "label": "publish", "source": { "id": "2", "$uuid": "tbi7gcg8ccok3iyuzrybu54ena", "name": "draft", "label": "draft", "color": "#5FA9FF", "archivedstatus": false, "onlinestatus": false, "draftstatus": true, "deletedstatus": false }, "target": { "id": "6", "$uuid": "tbi7gcg8ccok3npk6fdgqtyymh", "name": "published", "label": "published", "color": "#6AD922", "archivedstatus": false, "onlinestatus": true, "draftstatus": false, "deletedstatus": false }, "archivedstatus": false, "onlinestatus": true, "draftstatus": false, "deletedstatus": false }, { "id": "7", "$uuid": "tbi7gcg8ccok3s4x7apx71xhsne55s6prkx64be", "name": "archive", "label": "archive", "source": { "id": "2", "$uuid": "tbi7gcg8ccok3iyuzrybu54ena", "name": "draft", "label": "draft", "color": "#5FA9FF", "archivedstatus": false, "onlinestatus": false, "draftstatus": true, "deletedstatus": false }, "target": { "id": "7", "$uuid": "tbi7gcg8ccok36t45uatq48a5h", "name": "archived", "label": "archived", "color": "#707889", "archivedstatus": true, "onlinestatus": false, "draftstatus": false, "deletedstatus": false }, "archivedstatus": true, "onlinestatus": false, "draftstatus": false, "deletedstatus": false }, { "id": "8", "$uuid": "tbi7gcg8ccok3s4x7apx71xhsndtxr4gbx89izy", "name": "submit", "label": "submit", "source": { "id": "2", "$uuid": "tbi7gcg8ccok3iyuzrybu54ena", "name": "draft", "label": "draft", "color": "#5FA9FF", "archivedstatus": false, "onlinestatus": false, "draftstatus": true, "deletedstatus": false }, "target": { "id": "8", "$uuid": "tbi7gcg8ccok38orr8nxsgk7zh", "name": "validation", "label": "validation", "color": "#FCB100", "archivedstatus": false, "onlinestatus": false, "draftstatus": false, "deletedstatus": false }, "archivedstatus": false, "onlinestatus": false, "draftstatus": false, "deletedstatus": false } ] } }, "links": { "href": "https://hexis-int.wedia-group.com/api/rest/dam/data/hexasset/workflow/27" }, "version": "1.0", "apiversion": "2.4" }

Know the different possible actions to change the state of a resource type

  • verb: POST

  • general form of the URI: /api/rest/{type of service}/{name of the resource type}/workflow

See response sample