Workflows

List Workflows

This operation provides support for retrieving all the workflows accessible to the current user, determined via the applied request authorization. This operation supports filtering and sorting of workflows based on the provided search criteria. By default this call will return a maximum of 50 sorted in descending order by the workflow’s start time.

The caller can define other limits suited to their application (see the limit query parameter), but the limit cannot be higher than 50. To ask for the next set of items pass the value of the cursor provided in the response to the cursor query parameter.

SecuritybearerAuth
Request
query Parameters
cursor
string (Cursor) non-empty

When the number of results for a request exceeds the allowed limit, the response will include a cursor. That value can then be sent via this parameter on a subsequent request to retrieve the next set of items.

limit
integer <int32> (Limit) [ 1 .. 50 ]

For a paginated request, this parameter defines the maximum number of items to retrieve.

object (WorkflowSearchPattern)

The query parameter provides filtering and sorting criteria that should be applied when performing a search. The value passed should be valid JSON that has been URL encoded.

Example: query="{ "filter" : { "fragmentId" : "593210d0-6ffe-42c9-818f-d7825e21d93d" } }"
Responses
200

A response containing a potentially paginated list of workflows.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

406

Unacceptable. Indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/cf/workflows
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "cursor": "string"
}

Start a workflow

This operation starts an AEM workflow related to Content Fragments. The following type of operations are available:

  • publish-folder - recursively publishes the fragments from a certain folder
  • unpublish-fragments - unpublish content fragments
  • unpublish-models - unpublish content fragment models
  • create-translation-structure - creates the folder structure for Language Copies of Content Fragments
  • move-fragments - move multiple Content Fragments
SecuritybearerAuth
Request
Request Body schema: application/json

Request parameters to start a workflow.

type
required
string (WorkflowType)

Type of workflow

workflowModelId
string
Default: "/etc/workflow/models/scheduled_tree_activation"

The workflow model id used for initiating the workflow instance

workflowTitle
string

A freely defined string used to identify the workflow when it executes.

agentId
string
Default: "publish"

The agent id used for publishing the content fragments.

scheduledTime
integer <int64>

The scheduled time as an epoch timestamp

folderPath
required
string (ContentFragmentPath) ^\/content\/dam(\/.*)?$

A valid path to a Content Fragment resource.

excludeSubFolders
boolean
Default: false

Whether the subfolders should be ignored

filterReferencesByStatus
Array of arrays unique

Provides the option to select which references should be included in the publication based on their status. When a status is selected (e.g., DRAFT), references with that status will be published along with the content fragment. Multiple statuses can be selected to include references with any of those statuses. If no option is selected, no references will be published regardless of their status.

Items Enum: "DRAFT" "UNPUBLISHED" "MODIFIED"
Responses
200

OK

400

Bad Request. The Problem Details object will provide more information about the exact cause.

406

Unacceptable. Indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

409

Conflict

413

"The HTTP 413 Content Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field. Prior to RFC 9110 the response phrase for the status was Payload Too Large. That name is still widely used."

415

Unsupported Media Type. When provided as a response to a PATCH request, the response will provide an Accept-Patch response header to notify the client what patch document media types are supported.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

post/cf/workflows
Request samples
application/json
{
  • "type": "publish-folder",
  • "workflowModelId": "/etc/workflow/models/scheduled_tree_activation",
  • "workflowTitle": "string",
  • "agentId": "publish",
  • "scheduledTime": 0,
  • "folderPath": "string",
  • "excludeSubFolders": false,
  • "filterReferencesByStatus": [
    ]
}
Response samples
application/json
{
  • "type": "publish-folder",
  • "workflowInstanceId": "string"
}

Get a Workflow

SecuritybearerAuth
Request
path Parameters
workflowInstanceId
required
string (Path) ^[^\\\[\]|*]*$

The workflow instance identifier.

Responses
200

OK

400

Bad Request. The Problem Details object will provide more information about the exact cause.

404

Not Found

406

Unacceptable. Indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/cf/workflows/{workflowInstanceId}
Request samples
Response samples
application/json
{
  • "workflowInstanceId": "string",
  • "workflowModel": "string",
  • "state": "RUNNING",
  • "initiator": "string",
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "payload": [
    ],
  • "comment": "string"
}