Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Web API for Workflow

  • Last UpdatedJun 18, 2025
  • 3 minute read

To enable Workflow Web API, you must manually configure it in IIS:

  1. Open IIS Manager.

  2. Locate the Workflow.WebAPI folder.

  3. Right-click and select Convert to Application.

You can interact with the Workflows using the following Workflow API endpoints:

HTTPS Requests

Description

POST

https://<ServerAddress>:<port>/Workflow.WebAPI/api/workflow/execute

Execute a workflow

POST

https://<ServerAddress>:<port>/Workflow.WebAPI/api/workflow/abort

Abort a workflow

POST

https://<ServerAddress>:<port>/Workflow.WebAPI/api/workflow/resume

Resume a workflow

POST

https://<ServerAddress>:<port>/Workflow.WebAPI/api/workflow/pause

Pause a workflow

POST

https://<ServerAddress>:<port>/Workflow.WebAPI/api/workflow/resumeworkflowwitherrors

Resume workflow with errors

POST

https://<ServerAddress>:<port>/Workflow.WebAPI/api/workflow/executewithvariables

Execute a workflow with variables

POST

https://<ServerAddress>:<port>/Workflow.WebAPI/api/workflow/AlertEngine

Trigger alert action in a workflow (e.g., approve/reject)

Operation Parameters

Body for execute endpoint:

Key

Value

Description

repository

<Repository Name>

Provide the repository name under which the workflow is present

workflow

<Workflow Name>

Provide the workflow name

version

<Workflow Version>

Provide the workflow version. If empty, it will consider the latest version during execution in value

user

<repository provider name>::<user name>

Provide the name of the user performing the action

e.g.,

  • activedirectory::UserLogonName

  • azureactivedirectory::UserEmailID

  • skeltalist::virtualactorid

Body for abort, resume, pause or resumeworkflowwitherrors endpoints:

Key

Value

Description

repository

<Repository Name>

Provide the repository name under which the workflow is present

workflow

<Workflow Name>

Provide the workflow name

executionid

<Execution ID>

Provide the execution id of the workflow to pause/resume/abort

user

<repository provider name>::<user name>

Provide the name of the user performing the action

e.g.,

  • activedirectory::UserLogonName

  • azureactivedirectory::UserEmailID

  • skeltalist::virtualactorid

Body for execute with variables endpoint:

Key

Value

Description

repository

<Repository Name>

Provide the repository name under which the workflow is present

workflow

<Workflow Name>

Provide the workflow name

user

<repository provider name>::<user name>

Provide the name of the user performing the action

e.g.,

  • activedirectory::UserLogonName

  • azureactivedirectory::UserEmailID

  • skeltalist::virtualactorid

data

<data>

Provide the data of the workflow definition

variables

[{"id":<id>,"name":<name>,"value":<value>,"type":<data type>}]

Provide the variable values to be consumed during workflow execution

e.g., [

{"id":"V123","name":"EmployeeID","value":361,"type":"number"},

{"id":"V124","name":"EmpName","value":"James","type":"string"}

]

refreshtokeninfo

<refresh token metadata>

Provide token information, including client ID, client secret, and refresh token, to execute the workflow

Body for Alert Engine endpoint:

Key

Value

Description

repository

<Repository Name>

Provide the repository name under which the workflow is present

workflow

<Workflow Name>

Provide the workflow name

executiondetailsid

<Execution Details ID>

Provide the ID of the execution instance requiring alert update

user

<repository provider name>::<user name>

Provide the name of the user performing the action

e.g.,

  • activedirectory::UserLogonName

  • azureactivedirectory::UserEmailID

  • skeltalist::virtualactorid

data

<data>

Provide the data of the workflow definition

output

<output>

Result of the action performed

status

<status>

Final status of the activity (e.g., Completed, Sleep)

Authorization

For authorization, there are two types of tokens available:

  • User Access Token: can be fetched using the API SFU.getUserAccessToken()

    Notes:
    - If a human activity is assigned to a user other than the workflow initiator, the user access token used after this activity will belong to the user who completes the task, not the initiator.
    - If the user access token expires during a waiting activity (e.g., scheduler or wait-for-event), the token is not automatically renewed. As a result, any subsequent Invoke web API activity that uses the user access token will fail.

  • Client Credential Token: can be fetched using the API SFU.getClientCredentialToken()

    Note: Workflows with Human Activities assigned to the Workflow Initiator option will not get the Inbox item if the Workflow API is executed using a Service to Service token. To ensure the Inbox item is generated, the activity must be assigned using the User, Role, or Filter condition options.

GET Methods

Endpoint

Description

GET

api/workflow/status?repo={repositoryname}&executionid={executionid}

Get the status of a workflow for a specific repository

GET

api/workflow/lastinstance?repo={repositoryname}&workflow={workflowname}

Get the execution ID and status of the most recently executed workflow

GET

api/workflow/activityoutput?repo={repositoryname}&executionid={executionid}&activityname={activityname}

Get the activity name and its output from the recently executed workflow

GET

api/workflow/activityoutput?repo={repositoryname}&executionid={executionid}&variablename={variablename}

Get the variable name and its value from the workflow

Query Parameters

For Status endpoint:

Key

Value

Description

repo

<Repository Name>

Provide the repository name under which the workflow is present

executionid

<Execution ID>

Provide the execution id of the workflow instance

For LastInstance endpoint:

Key

Value

Description

repo

<Repository Name>

Provide the repository name under which the workflow is present

workflow

<Workflow Name>

Provide the workflow name

For ActivityOutput endpoint:

Key

Value

Description

repo

<Repository Name>

Provide the repository name under which the workflow is present

executionid

<Execution ID>

Provide the execution id of the workflow instance

activityname

<Activity Name>

Provide the name of the activity in the workflow

For VariableValue endpoint:

Key

Value

Description

repo

<Repository Name>

Provide the repository name under which the workflow is present

executionid

<Execution ID>

Provide the execution id of the workflow instance

variablename

<Variable Name>

Provide the name of the variable in the workflow

In This Topic
TitleResults for “How to create a CRG?”Also Available in