Workflow Management API
Base URL: https://api.asgardeo.io/t/<ORGANIZATION_NAME>/api/server/v1
The WSO2 Identity Platform - Workflow Management Rest API (version v1).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
OAuth2: oauth2
authorizationCode flow, token URL https://api.asgardeo.io/t/{org-name}/oauth2/token, authorization URL https://api.asgardeo.io/t/{org-name}/oauth2/authorize
4 scopes
| Scope | Description |
|---|---|
read | internal_workflow_view |
write | internal_workflow_create |
update | internal_workflow_update |
delete | internal_workflow_delete |
Workflow Management
Retrieve all the available workflows.
GET /workflows
Retrieve all the available workflows in the system.
Scope required: internal_workflow_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer (int32) | Maximum number of records to return | |
offset | query | integer (int32) | Number of records to skip for pagination | |
filter | query | string | Records, filtered by their name |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the created workflow |
description | string | Description of the created workflow | |
engine | string | Yes | Name of the selected workflow engine |
notificationsForInitiator | InitiatorNotifications | ||
template | WorkflowTemplate | ||
template.name | string | Yes | Name of the workflow template |
template.notificationsForApprovers | ApproverNotifications | ||
template.steps | array of WorkflowTemplateParameters |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflow-id | path | string | Yes | Workflow ID |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflow-id | path | string | Yes | Workflow ID |
Request body: application/json
Contains the details of the updated workflow.
Schema: WorkflowRequest
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the created workflow |
description | string | Description of the created workflow | |
engine | string | Yes | Name of the selected workflow engine |
notificationsForInitiator | InitiatorNotifications | ||
template | WorkflowTemplate | ||
template.name | string | Yes | Name of the workflow template |
template.notificationsForApprovers | ApproverNotifications | ||
template.steps | array of WorkflowTemplateParameters |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflow-id | path | string | Yes | Workflow ID |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer (int32) | Maximum number of records to return | |
offset | query | integer (int32) | Number of records to skip for pagination | |
filter | query | string | Records, filtered by their name |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
associationName | string | Yes | Name of the workflow association |
operation | Operation | Yes | Name of the user operation Allowed values: |
workflowId | string | Yes | Id of the assigned workflow |
isEnabled | boolean | Association Status Default: | |
rule | ORRule | 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
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
association-id | path | string | Yes | Workflow Association ID |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
association-id | path | string | Yes | Workflow Association ID |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
association-id | path | string | Yes | Workflow Association ID |
Request body: application/json
Represents the association details to be updated.
Schema: WorkflowAssociationPatchRequest
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
associationName | string | Name of the workflow association | |
operation | Operation | Name of the user operation Allowed values: | |
workflowId | string | Id of the assigned workflow | |
isEnabled | boolean | Association Status | |
rule | ORRule | 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
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | Default: | |
offset | query | integer | Default: | |
filter | query | string | Filter conditions using logical expressions. Supported operators: Combine multiple conditions with Example: |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
instance_id | path | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
instance_id | path | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
instance_id | path | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
profileName | string | Yes | A unique name for the workflow engine. |
workerHostURL | string | URL of the workflow worker node. | |
managerHostURL | string | URL of the workflow manager node. | |
userName | string | Username of the creator of the workflow engine. |
WorkflowListResponse
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | ||
startIndex | integer | ||
count | integer | ||
workflows | array of WorkflowListItem |
WorkflowListItem
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Unique id to represent a workflow | |
name | string | Display name of the workflow | |
description | string | Detailed description of the workflow | |
engine | string | Category in which the workflow is deployed | |
template | string | Template defining the approval process for the workflow |
WorkflowResponse
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Id of the workflow | |
name | string | Name of the created workflow | |
description | string | Description of the created workflow | |
engine | string | Name of the selected workflow engine | |
notificationsForInitiator | InitiatorNotifications | ||
template | WorkflowTemplateBase |
WorkflowRequest
Type: object
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the created workflow |
description | string | Description of the created workflow | |
engine | string | Yes | Name of the selected workflow engine |
notificationsForInitiator | InitiatorNotifications | ||
template | WorkflowTemplate | ||
template.name | string | Yes | Name of the workflow template |
template.notificationsForApprovers | ApproverNotifications | ||
template.steps | array of WorkflowTemplateParameters |
WorkflowTemplate
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Name of the workflow template | |
notificationsForApprovers | ApproverNotifications | ||
steps | array of WorkflowTemplateParameters |
WorkflowTemplateParameters
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
step | integer | ||
options | array of OptionDetails |
WorkflowTemplateBase
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Name of the workflow template | |
notificationsForApprovers | ApproverNotifications | ||
steps | array of WorkflowTemplateParametersBase |
WorkflowTemplateParametersBase
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
step | integer | ||
options | array of OptionDetails |
InitiatorNotifications
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
channels | array of string | Notification channels to be used for initiator (e.g., email, sms) | |
events | array of string | Events that trigger notifications for initiator (e.g., onApproval, onRejection) |
ApproverNotifications
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
channels | array of string | Notification channels to be used for approvers (e.g., email, sms) | |
events | array of string | Events that trigger notifications for approvers (e.g., onAssignment, onRelease) |
WorkflowAssociationListResponse
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | ||
startIndex | integer | ||
count | integer | ||
workflowAssociations | array of WorkflowAssociationListItem |
WorkflowAssociationListItem
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Unique id to represent a workflow association | |
associationName | string | Name of the workflow association | |
operation | Operation | Name of the user operation Allowed values: | |
workflowName | string | Assigned Workflow | |
isEnabled | boolean | Association Status | |
rule | ORRuleResponse | Rule configured for the action. |
WorkflowAssociationResponse
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Unique id to represent a workflow association | |
associationName | string | Name of the workflow association | |
operation | Operation | Name of the user operation Allowed values: | |
workflowName | string | Assigned Workflow | |
isEnabled | boolean | Association Status | |
rule | ORRuleResponse | Rule configured for the action. |
WorkflowAssociationRequest
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
associationName | string | Yes | Name of the workflow association |
operation | Operation | Yes | Name of the user operation Allowed values: |
workflowId | string | Yes | Id of the assigned workflow |
isEnabled | boolean | Association Status Default: | |
rule | ORRule | 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
| Name | Type | Required | Description |
|---|---|---|---|
associationName | string | Name of the workflow association | |
operation | Operation | Name of the user operation Allowed values: | |
workflowId | string | Id of the assigned workflow | |
isEnabled | boolean | Association Status | |
rule | ORRule | 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
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | ||
startIndex | integer | ||
count | integer | ||
instances | array of WorkflowInstanceListItem |
WorkflowInstanceListItem
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
workflowInstanceId | string | Unique id to represent a workflow instance | |
eventType | Operation | Name of the user operation Allowed values: | |
requestInitiator | string | ||
createdAt | string | ||
updatedAt | string | ||
status | InstanceStatus | Allowed values: |
WorkflowInstanceResponse
Type: object
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
workflowInstanceId | string | Unique id to represent a workflow instance | |
eventType | Operation | Name of the user operation Allowed values: | |
createdAt | string | ||
requestInitiator | string | ||
updatedAt | string | ||
status | InstanceStatus | Allowed values: | |
requestParameters | object | ||
properties | array of Property |
InstanceStatus
Type: string
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | ||
traceId | string |
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
| Name | Type | Required | Description |
|---|---|---|---|
condition | string | The logical condition for combining the sub-rules. For ORRule, the value must always be "OR". Allowed values: | |
rules | array of ANDRule |
ORRuleResponse
Type: object
Rule configured for the action.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
condition | string | Allowed values: | |
rules | array 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
| Name | Type | Required | Description |
|---|---|---|---|
condition | string | Yes | The logical condition for combining the expressions. For ANDRule, the value must always be "AND". Allowed values: |
expressions | array of Expression | Yes | 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
| Name | Type | Required | Description |
|---|---|---|---|
condition | string | The logical condition for combining the expressions. For ANDRule, the value must always be "AND". Allowed values: | |
expressions | array 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
| Name | Type | Required | Description |
|---|---|---|---|
field | string | Yes | The field or attribute of the entity being evaluated (e.g.,application, role). |
operator | string | Yes | The comparison operator used to evaluate the field and value. Common operators include "equals", "contains", "startsWith", etc. |
value | string | Yes | The value that the field is compared against based on the operator. |
ExpressionResponse
Type: object
Expressions in the rule.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
field | string | ||
operator | string | ||
value | string |
Was this page helpful?