The Swagger file describes the Workflow REST endpoints to third party software, such as Microsoft Power Automate. Click on Copy to copy the Swagger file URL address to your clipboard.
Click on Open Link to open the K2 Workflow Api swagger page and access the list of operations, tasks, and workflow functions.
Click on Download to open a new web page displaying the JSON swagger file. Then use File - Save As from your browser to save the descriptor file. You can now use the descriptor file in a third party application, like Microsoft Power Automate.
The swagger file is instance specific, and describes the current instance of the K2 server.
Swagger Page
Use the swagger page to test, use, or familiarize yourself with the endpoint functions.

Function |
Description |
Operations
|
GET op/{operation} |
This function is reserved for system use |
Server Events
|
GET serverEvents/{serialNumber} |
Returns a list of server events available to you from the K2 server. Use this function to identify the serialNumber value to be used in the following function |
POST serverEvents/{serialNumber}/finish |
Completes the server event identified by the serialNumber. Enter Data fields, XML fields, or Item References as required in the JSON |
Tasks
|
GET tasks |
Returns a list of tasks assigned to you. You can use this function to identify the serial number values used in the following functions |
GET tasks/{serialNumber} |
Returns a description of the task associated with the serial number |
GET tasks/{serialNumber}/actions |
Returns a list of actions available for the task associated with the serial number |
POST tasks/{serialNumber}/actions/redirect |
Redirects the task to the specified user |
POST tasks/{serialNumber}/actions/sleep |
Sends the task into sleep mode for the duration specified. Only one of the body functions can be used, either SleepFor: nnn or SleepUntil : DateTime |
POST tasks/{serialNumber}/actions/release |
Releases an Open task back to the assignment pool |
POST tasks/{serialNumber}/actions/wake |
Returns a sleeping task back to Open status |
POST tasks/{serialNumber}/actions/assign |
Assigns the task to the specified user |
POST tasks/{serialNumber}/actions/{customAction} |
Performs the specified workflow action. Use the GET tasks/{serialNumber}/actions function to list the possible actions of the task |
Workflows
|
GET workFlows |
Returns a list of workflows available to you |
GET workFlows/{id} |
Returns in JSON format the parameters of the specified workflow. Use this function to identify Datafield, XML fields, and Reference Items needed in the POST workflows/{id} function |
POST workFlows/{id} |
Starts a new instance of the specified workflow. You can send specific properties identified in the GET workflows/{id} function |
GET workFlows/{id}/schema |
Returns the parameters of the specified workflow in JSON String Format, ready for use in third party applications, like Microsoft Power Automate |
You can use the Try it out! button on the swagger page to get a JSON response from the web service. For example, the Get Workflows GET function will return the number of workflows on the K2 server, and give the id, defaultVersionID, name, folder, and systemName values for each workflow.
A POST swagger function may require parameters and instance data. For example, the Start Workfow POST function needs the workflow id number. Body values can be entered; use the Example Value JSON examples to guide your construction, or use empty brackets {} to enter no data. Add Data fields, XML fields, and Item References where needed. A full schema of a workflow is available from the GET workflows/{id} function. The GET workflows/{id}/schema function provides JSON schema formatted as a string ready for Microsoft Power Automate.