Skip to main content

Workflow Management API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/api/server/v1

The WSO2 Identity Server - Workflow Rest API (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

BasicAuth: HTTP basic

OAuth2: oauth2

authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize

Workflow Management​

Retrieve all the available workflows.​

GET /workflows

Retrieve all the available workflows in the system.

Scope required: internal_workflow_view

Parameters

NameInTypeRequiredDescription
limitqueryinteger (int32)

Maximum number of records to return

offsetqueryinteger (int32)

Number of records to skip for pagination

filterquerystring

Records, filtered by their name

Responses

CodeDescriptionSchema
200

Successful response

WorkflowListResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Add a new workflow.​

POST /workflows

Create a new workflow using the specified workflow template and execution engine.

Scope required: internal_workflow_create

Request body (required): application/json

This represents the workflow to be created.

Schema: WorkflowRequest

8 properties
NameTypeRequiredDescription
namestringYes

Name of the created workflow

descriptionstring

Description of the created workflow

enginestringYes

Name of the selected workflow engine

notificationsForInitiatorInitiatorNotifications
templateWorkflowTemplate
template.namestringYes

Name of the workflow template

template.notificationsForApproversApproverNotifications
template.stepsarray of WorkflowTemplateParameters

Responses

CodeDescriptionSchema
201

Successful response

WorkflowResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

409

Item Already Exists

Error
500

Internal Server Error

Error

Retrieve the workflow by workflow id.​

GET /workflows/{workflow-id}

Retrieve information about a specific workflow identified by the workflow id.

Scope required: internal_workflow_view

Parameters

NameInTypeRequiredDescription
workflow-idpathstringYes

Workflow ID

Responses

CodeDescriptionSchema
200

Successful response

WorkflowResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Update an existing workflow.​

PUT /workflows/{workflow-id}

Update a workflow identified by workflow-id.

Scope required: internal_workflow_update

Parameters

NameInTypeRequiredDescription
workflow-idpathstringYes

Workflow ID

Request body: application/json

Contains the details of the updated workflow.

Schema: WorkflowRequest

8 properties
NameTypeRequiredDescription
namestringYes

Name of the created workflow

descriptionstring

Description of the created workflow

enginestringYes

Name of the selected workflow engine

notificationsForInitiatorInitiatorNotifications
templateWorkflowTemplate
template.namestringYes

Name of the workflow template

template.notificationsForApproversApproverNotifications
template.stepsarray of WorkflowTemplateParameters

Responses

CodeDescriptionSchema
200

Successful response

WorkflowResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Delete the workflow by workflow-id.​

DEL /workflows/{workflow-id}

Delete a specific workflow identified by the workflow-id

Scope required: internal_workflow_delete

Parameters

NameInTypeRequiredDescription
workflow-idpathstringYes

Workflow ID

Responses

CodeDescriptionSchema
204

Item Deleted

400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Workflow Associations Management​

Retrieve all the available workflow associations.​

GET /workflow-associations

Retrieve all the available workflow associations in the system.

Scope required: internal_workflow_association_view

Parameters

NameInTypeRequiredDescription
limitqueryinteger (int32)

Maximum number of records to return

offsetqueryinteger (int32)

Number of records to skip for pagination

filterquerystring

Records, filtered by their name

Responses

CodeDescriptionSchema
200

Successful Response

WorkflowAssociationListResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Create a new workflow association.​

POST /workflow-associations

Create a new workflow association by assigning a user operation to an existing workflow.

Scope required: internal_workflow_association_create

Request body (required): application/json

Contains the details of the newly created workflow association.

Schema: WorkflowAssociationRequest

5 properties
NameTypeRequiredDescription
associationNamestringYes

Name of the workflow association

operationOperationYes

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

workflowIdstringYes

Id of the assigned workflow

isEnabledboolean

Association Status

Default: true

ruleORRule

Represents a rule configuration that combines multiple sub-rules with an OR condition. If any of the sub-rules evaluate to true, the ORRule is considered satisfied.

Responses

CodeDescriptionSchema
201

Item Created

WorkflowAssociationResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

409

Item Already Exists

Error
500

Internal Server Error

Error

Get the workflow association by association-id.​

GET /workflow-associations/{association-id}

Get a specific workflow association identified by the association id.

Scope required: internal_workflow_association_view

Parameters

NameInTypeRequiredDescription
association-idpathstringYes

Workflow Association ID

Responses

CodeDescriptionSchema
200

Array of workflow associations matching the search criteria

WorkflowAssociationResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Delete the workflow association by association-id.​

DEL /workflow-associations/{association-id}

Delete a specific workflow association identified by the association ID.

Scope required: internal_workflow_association_view

Parameters

NameInTypeRequiredDescription
association-idpathstringYes

Workflow Association ID

Responses

CodeDescriptionSchema
204

Item Deleted

400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Partially update association by association-id.​

PATCH /workflow-associations/{association-id}

Partially update an association by association-id.

Scope required: internal_workflow_association_update

Parameters

NameInTypeRequiredDescription
association-idpathstringYes

Workflow Association ID

Request body: application/json

Represents the association details to be updated.

Schema: WorkflowAssociationPatchRequest

5 properties
NameTypeRequiredDescription
associationNamestring

Name of the workflow association

operationOperation

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

workflowIdstring

Id of the assigned workflow

isEnabledboolean

Association Status

ruleORRule

Represents a rule configuration that combines multiple sub-rules with an OR condition. If any of the sub-rules evaluate to true, the ORRule is considered satisfied.

Responses

CodeDescriptionSchema
200

Successfully Updated

WorkflowAssociationResponse
400

Bad Request

Error
401

#/components/responses/Unauthorized

403

#/components/responses/Forbidden

409

#/components/responses/Conflict

Error
500

Server Error

Error

Workflow Instances Management​

Get workflow instances for a tenant​

GET /workflow-instances

Retrieve workflow instances filtered by various parameters.

Scope required: internal_workflow_instance_view

Parameters

NameInTypeRequiredDescription
limitqueryinteger

Default: 25

offsetqueryinteger

Default: 0

filterquerystring

Filter conditions using logical expressions. Supported operators: eq, le, ge.

Combine multiple conditions with and.

Example:

`operationType+eq+ADD_USER+and+requestType+eq+MY_TASKS+and+status+eq+PENDING+and+createdAt+ge+2025-06-01 09:57:47.000+and+createdAt+le+2025-07-31 09:57:47.000`

Responses

CodeDescriptionSchema
200

Workflow instances retrieved successfully

WorkflowInstanceListResponse
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Get workflow instance by ID​

GET /workflow-instances/{instance_id}

Retrieve a specific workflow instance by providing its unique ID.

Scope required: internal_workflow_instance_view

Parameters

NameInTypeRequiredDescription
instance_idpathstringYes

Responses

CodeDescriptionSchema
200

Workflow instance retrieved successfully

WorkflowInstanceResponse
404

The specified resource is not found

Error

Delete workflow instance by ID​

DEL /workflow-instances/{instance_id}

Delete a workflow instance by providing the instance ID.

Scope required: internal_workflow_instance_delete

Parameters

NameInTypeRequiredDescription
instance_idpathstringYes

Responses

CodeDescriptionSchema
204

Successfully deleted the workflow instance

404

The specified resource is not found

Error

Abort a workflow instance by ID​

POST /workflow-instances/{instance_id}/abort

Abort a workflow instance by providing the instance ID.

Scope required: internal_workflow_instance_update

Parameters

NameInTypeRequiredDescription
instance_idpathstringYes

Responses

CodeDescriptionSchema
200

Successfully aborted the workflow instance

InstanceStatus
400

Invalid input request

Error
404

The specified resource is not found

Error
500

Internal Server Error

Error

Workflow Engines​

Retrieve all the available workflow engines.​

GET /workflow-engines

Retrieve metadata information of all the workflow engines in the system.

Responses

CodeDescriptionSchema
200

search results matching criteria

array of WorkflowEngine
400

Invalid input request

Error
401

Unauthorized

403

Forbidden

404

The specified resource is not found

Error
500

Internal Server Error

Error

Schemas​

WorkflowEngine​

Type: object

4 properties
NameTypeRequiredDescription
profileNamestringYes

A unique name for the workflow engine.

workerHostURLstring

URL of the workflow worker node.

managerHostURLstring

URL of the workflow manager node.

userNamestring

Username of the creator of the workflow engine.

WorkflowListResponse​

Type: object

4 properties
NameTypeRequiredDescription
totalResultsinteger
startIndexinteger
countinteger
workflowsarray of WorkflowListItem

WorkflowListItem​

Type: object

5 properties
NameTypeRequiredDescription
idstring

Unique id to represent a workflow

namestring

Display name of the workflow

descriptionstring

Detailed description of the workflow

enginestring

Category in which the workflow is deployed

templatestring

Template defining the approval process for the workflow

WorkflowResponse​

Type: object

6 properties
NameTypeRequiredDescription
idstring

Id of the workflow

namestring

Name of the created workflow

descriptionstring

Description of the created workflow

enginestring

Name of the selected workflow engine

notificationsForInitiatorInitiatorNotifications
templateWorkflowTemplateBase

WorkflowRequest​

Type: object

8 properties
NameTypeRequiredDescription
namestringYes

Name of the created workflow

descriptionstring

Description of the created workflow

enginestringYes

Name of the selected workflow engine

notificationsForInitiatorInitiatorNotifications
templateWorkflowTemplate
template.namestringYes

Name of the workflow template

template.notificationsForApproversApproverNotifications
template.stepsarray of WorkflowTemplateParameters

WorkflowTemplate​

Type: object

3 properties
NameTypeRequiredDescription
namestring

Name of the workflow template

notificationsForApproversApproverNotifications
stepsarray of WorkflowTemplateParameters

WorkflowTemplateParameters​

Type: object

2 properties
NameTypeRequiredDescription
stepinteger
optionsarray of OptionDetails

WorkflowTemplateBase​

Type: object

3 properties
NameTypeRequiredDescription
namestring

Name of the workflow template

notificationsForApproversApproverNotifications
stepsarray of WorkflowTemplateParametersBase

WorkflowTemplateParametersBase​

Type: object

2 properties
NameTypeRequiredDescription
stepinteger
optionsarray of OptionDetails

OptionDetails​

Type: object

2 properties
NameTypeRequiredDescription
entitystring
valuesarray of string

InitiatorNotifications​

Type: object

2 properties
NameTypeRequiredDescription
channelsarray of string

Notification channels to be used for initiator (e.g., email, sms)

eventsarray of string

Events that trigger notifications for initiator (e.g., onApproval, onRejection)

ApproverNotifications​

Type: object

2 properties
NameTypeRequiredDescription
channelsarray of string

Notification channels to be used for approvers (e.g., email, sms)

eventsarray of string

Events that trigger notifications for approvers (e.g., onAssignment, onRelease)

WorkflowAssociationListResponse​

Type: object

4 properties
NameTypeRequiredDescription
totalResultsinteger
startIndexinteger
countinteger
workflowAssociationsarray of WorkflowAssociationListItem

WorkflowAssociationListItem​

Type: object

6 properties
NameTypeRequiredDescription
idstring

Unique id to represent a workflow association

associationNamestring

Name of the workflow association

operationOperation

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

workflowNamestring

Assigned Workflow

isEnabledboolean

Association Status

ruleORRuleResponse

Rule configured for the action.

WorkflowAssociationResponse​

Type: object

6 properties
NameTypeRequiredDescription
idstring

Unique id to represent a workflow association

associationNamestring

Name of the workflow association

operationOperation

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

workflowNamestring

Assigned Workflow

isEnabledboolean

Association Status

ruleORRuleResponse

Rule configured for the action.

WorkflowAssociationRequest​

Type: object

5 properties
NameTypeRequiredDescription
associationNamestringYes

Name of the workflow association

operationOperationYes

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

workflowIdstringYes

Id of the assigned workflow

isEnabledboolean

Association Status

Default: true

ruleORRule

Represents a rule configuration that combines multiple sub-rules with an OR condition. If any of the sub-rules evaluate to true, the ORRule is considered satisfied.

WorkflowAssociationPatchRequest​

Type: object

5 properties
NameTypeRequiredDescription
associationNamestring

Name of the workflow association

operationOperation

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

workflowIdstring

Id of the assigned workflow

isEnabledboolean

Association Status

ruleORRule

Represents a rule configuration that combines multiple sub-rules with an OR condition. If any of the sub-rules evaluate to true, the ORRule is considered satisfied.

WorkflowInstanceListResponse​

Type: object

4 properties
NameTypeRequiredDescription
totalResultsinteger
startIndexinteger
countinteger
instancesarray of WorkflowInstanceListItem

WorkflowInstanceListItem​

Type: object

6 properties
NameTypeRequiredDescription
workflowInstanceIdstring

Unique id to represent a workflow instance

eventTypeOperation

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

requestInitiatorstring
createdAtstring
updatedAtstring
statusInstanceStatus

Allowed values: ALL_TASKS, PENDING, APPROVED, REJECTED, FAILED, DELETED, ABORTED

WorkflowInstanceResponse​

Type: object

8 properties
NameTypeRequiredDescription
workflowInstanceIdstring

Unique id to represent a workflow instance

eventTypeOperation

Name of the user operation

Allowed values: ADD_USER, SELF_REGISTER_USER, DELETE_USER, UPDATE_ROLES_OF_USERS, ADD_ROLE, DELETE_ROLE, UPDATE_ROLE_NAME, UPDATE_USERS_OF_ROLES, DELETE_USER_CLAIMS, UPDATE_USER_CLAIMS

createdAtstring
requestInitiatorstring
updatedAtstring
statusInstanceStatus

Allowed values: ALL_TASKS, PENDING, APPROVED, REJECTED, FAILED, DELETED, ABORTED

requestParametersobject
propertiesarray of Property

Property​

Type: object

2 properties
NameTypeRequiredDescription
keystringYes
valuestringYes

InstanceStatus​

Type: string

Operation​

Type: string

Name of the user operation

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstring
traceIdstring

ORRule​

Type: object

Represents a rule configuration that combines multiple sub-rules with an OR condition. If any of the sub-rules evaluate to true, the ORRule is considered satisfied.

2 properties
NameTypeRequiredDescription
conditionstring

The logical condition for combining the sub-rules. For ORRule, the value must always be "OR".

Allowed values: OR

rulesarray of ANDRule

ORRuleResponse​

Type: object

Rule configured for the action.

2 properties
NameTypeRequiredDescription
conditionstring

Allowed values: OR

rulesarray of ANDRuleResponse

A list of sub-rules that are combined using the OR condition. Each sub-rule is an ANDRule.

ANDRule​

Type: object

A sub-rule that combines expression with AND condition.

2 properties
NameTypeRequiredDescription
conditionstringYes

The logical condition for combining the expressions. For ANDRule, the value must always be "AND".

Allowed values: AND

expressionsarray of ExpressionYes

A list of expressions that are combined using the AND condition. All expressions must evaluate to true for the ANDRule to pass.

ANDRuleResponse​

Type: object

Represents a rule configuration that combines multiple expressions with an AND condition. All expressions in the ANDRule must evaluate to true for the rule to be satisfied.

2 properties
NameTypeRequiredDescription
conditionstring

The logical condition for combining the expressions. For ANDRule, the value must always be "AND".

Allowed values: AND

expressionsarray of ExpressionResponse

A list of expressions that are combined using the AND condition. All expressions must evaluate to true for the ANDRule to pass.

Expression​

Type: object

Represents a single logical condition or comparison within a rule. An expression defines a field, and operator, and a value that is evaluated.

3 properties
NameTypeRequiredDescription
fieldstringYes

The field or attribute of the entity being evaluated (e.g.,application, role).

operatorstringYes

The comparison operator used to evaluate the field and value. Common operators include "equals", "contains", "startsWith", etc.

valuestringYes

The value that the field is compared against based on the operator.

ExpressionResponse​

Type: object

Expressions in the rule.

3 properties
NameTypeRequiredDescription
fieldstring
operatorstring
valuestring

Was this page helpful?