Use the K2 Workflow API service to remotely work with workflows and tasks.
Status: Preview |
Tier: Standard |
Version: v1 |
Name |
Summary |
Get Operations List |
|
Get Server Event |
|
ServerEvent_Finish (string serialNumber, UpdateFieldsRequest userDefinedFields) |
Finish Server Event |
Get Tasks |
|
Get Task |
|
Get Task Actions |
|
Tasks_PostRedirectAction (string serialNumber, UserDefinedRedirect redirectData) |
Redirect Task |
Tasks_PostSleepAction (string serialNumber, UserDefinedSleep sleepData) |
Sleep Task |
Release Task |
|
Wake Task |
|
Assign Task |
|
Action Task |
|
Get Workflows |
|
Get Workflow |
|
StartWorkflow (integer id, UserDefinedWorkflowInstance instance) |
Start Workflow |
Get Workflow Schema |
Name |
Summary |
Name |
Summary |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Summary: Get Operations List
Description: Use operations to manage the workflow API.
Syntax:
K2Workflow.Operations_Get (string operation)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
operation |
string (Refresh) |
The operation to perform. |
True |
Returns:
Type:string
Summary: Get Server Event
Description: Gets a server event by serial number.
Syntax:
K2Workflow.ServerEvent_Get (string serialNumber)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Server Event Serial Number) |
The serial number of the server event. Ex: 1234_5678. |
True |
Returns:
Summary: Finish Server Event
Description: Send a finish response to an async server task awaiting a response
Syntax:
K2Workflow.ServerEvent_Finish (string serialNumber, UpdateFieldsRequest userDefinedFields)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Server Event Serial Number) |
The serial number of the server event. Ex: 1234_5678 |
True |
|
userDefinedFields |
|
|
True |
Returns:
Summary: Get Tasks
Description: Obtain a list of tasks available to the connected user.
Syntax:
K2Workflow.Tasks_Get ([Optional]string state)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
state |
string (All, Allocated, Sleeping, SharedFrom, SharedTo)Values: [All, Allocated, Sleeping] |
Returns list of tasks for the connected user. |
False |
Returns:
Type:TasksResponse
Summary: Get Task
Description: Gets a task by serial number.
Syntax:
K2Workflow.Tasks_GetTask (string serialNumber)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
Returns:
Type:Task
Summary: Get Task Actions
Description: Gets a list of actions for the task.
Syntax:
K2Workflow.Tasks_GetTaskActions (string serialNumber)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
Returns:
Type:TaskActionsResponse
Summary: Redirect Task
Description: Sends a task to another person.
Syntax:
K2Workflow.Tasks_PostRedirectAction (string serialNumber, UserDefinedRedirect redirectData)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
|
redirectData |
|
|
True |
Returns:
Summary: Sleep Task
Description: Sleeps a task for a duration, either number of seconds or until a date.
Syntax:
K2Workflow.Tasks_PostSleepAction (string serialNumber, UserDefinedSleep sleepData)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
|
sleepData |
|
|
True |
Returns:
Summary: Release Task
Description: Releases a task.
Syntax:
K2Workflow.Tasks_PostReleaseAction (string serialNumber)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
Returns:
Summary: Wake Task
Description: Awakens a sleeping task.
Syntax:
K2Workflow.Tasks_PostWakeAction (string serialNumber)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
Returns:
Type:Tasks_PostWakeActionResponse
Summary: Assign Task
Description: Assigns a task to the current user.
Syntax:
K2Workflow.Tasks_PostAssignAction (string serialNumber)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
Returns:
Type:Tasks_PostAssignActionResponse
Summary: Action Task
Description: Performs a workflow action.
Syntax:
K2Workflow.Tasks_TaskCustomAction (string serialNumber, string customAction, UpdateFieldsRequest userDefinedFields)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
serialNumber |
string (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
|
customAction |
string (Custom Action) |
The task action, defined by the workflow. |
True |
|
userDefinedFields |
|
|
True |
Returns:
Summary: Get Workflows
Description: Get a list of available workflows.
Syntax:
K2Workflow.GetWorkflows ([Optional]string type)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
type |
string (Workflow Type)Values: [Startable, Owned] |
The type of workflow. Startable or Owned. |
False |
Returns:
Type:WorkflowLabelsResponse[WorkflowLabel]
Summary: Get Workflow
Description: Gets a workflow definition by ID.
Syntax:
K2Workflow.GetWorkflow (integer id)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
id |
integer(int32) (Workflow ID) |
The ID of the workflow. |
True |
Returns:
Type:WorkflowDataResponse
Summary: Start Workflow
Description: Creates and starts a new workflow instance.
Syntax:
K2Workflow.StartWorkflow (integer id, UserDefinedWorkflowInstance instance)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
id |
integer(int32) (Workflow ID) |
Specify a workflow ID to start instance. |
True |
|
instance |
|
|
True |
Returns:
Type:integer(int32)
Summary: Get Workflow Schema
Description: Gets a workflow JSON schema by ID.
Syntax:
K2Workflow.GetWorkflowSchema (integer id)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
id |
integer(int32) (Serial Number) |
The serial number of the task. Ex: 1234_5678 |
True |
Returns:
Summary:
Description:
Properties:
Name |
Type |
Summary |
StartDate |
string(date-time) Event Instance Start Date |
Date and time the event instance started. |
ExpectedDuration |
integer(int32) Event Instance Expected Duration |
Expected duration of the event instance. |
Priority |
integer(int32) Event Instance Priority |
Priority of the event instance. |
MetaData |
string Event Instance Metadata |
Metadata for the event instance. |
Description |
string Event Instance Description |
Description of the event instance. |
Name |
string Event Instance Name |
Name of the event instance. |
ID |
integer(int32) Event Instance ID |
ID of the event instance. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
EventInstance |
|
|
Description |
string Event Instance Description |
Description of the event instance. |
ExpectedDuration |
integer(int32) Event Instance Expected Duration |
Expected duration of the event instance. |
ID |
integer(int32) Event Instance ID |
ID of the event instance. |
MetaData |
string Event Instance Metadata |
Metadata for the event instance. |
Name |
string Event Instance Name |
Name of the event instance. |
Priority |
integer(int32) Event Instance Priority |
Priority of the event instance. |
StartDate |
string(date-time) Event Instance Start Date |
Date and time the event instance started. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
serialNumber |
string Server Event Serial Number |
The serial number of the server event. Ex: 1234_5678 |
workflowID |
integer(int32) Server Event Workflow ID |
The ID of the workflow associated with the server event. |
workflowName |
string Server Event Workflow Name |
The name of the workflow associated with the server event. |
workflowDisplayName |
string Server Event Workflow Display Name |
The display name of the workflow associated with the server event. |
workflowCategory |
string Server Event Workflow Category |
The category of the workflow associated with the server event. |
workflowInstanceID |
integer(int32) Server Event Workflow Instance ID |
The instance ID of the workflow associated with the server event. |
workflowInstanceFolio |
string Server Event Workflow Folio |
The folio of the workflow instance associated with the server event. |
activityInstanceID |
integer(int32) Server Event Activity Instance ID |
The activity instance ID of the server event. |
activityInstanceDestinationID |
integer(int32) Server Event Activity Destination ID |
The activity instance destination ID of the server event. |
activityName |
string Server Event Activity Name |
The activity name of the server event. |
eventName |
string Server Event Event Name |
The event name of the server event. |
eventDescription |
string Server Event Event Description |
The event description of the server event. |
originator |
|
|
eventInstance |
|
|
dataFields |
Server Event Activity Data Fields |
The data fields of the activity. |
xmlFields |
array of (UserDefinedXmlField) Server Event Activity XML Fields |
The XML fields of the activity. |
itemReferences |
Server Event Item References |
The item references of the workflow instance. |
workflowInstanceDataFieldsString |
string Server Event Workflow Data Fields String |
String representaation of the data fields of the Workflow Instance. |
itemReferencesString |
string Server Event Item References String |
String representing the item references of the workflow instance. |
viewFlowURL |
string
|
|
Summary: Server Event Activity Data Fields
Description: The data fields of the activity.
Properties:
Name |
Type |
Summary |
Summary: Server Event Item References
Description: The item references of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
serialNumber |
string Task Serial Number |
The serial number of the task. Ex: 1234_5678 |
status |
string Task Status |
The status of the task. Ex: Open, Completed, Sleep, Allocated, Available Values: [Open, Completed, Sleep, Allocated, Available] |
taskStartDate |
string(date-time) Task Start Date |
The start date of the task. |
sleepUntil |
string(date-time) Task Sleep Duration |
The date and time when the task will wake. |
priority |
integer(int32) Task Priority |
The priority of the task. |
formURL |
string Task Form URL |
The form URL of the task. |
viewFlowURL |
string Task View Flow URL |
The View Flow URL of the task. |
workflowID |
integer(int32) Task Workflow ID |
The ID of the workflow associated with the task. |
workflowName |
string Task Workflow Name |
The name of the workflow associated with the task. |
workflowDisplayName |
string Task Workflow Display Name |
The display name of the workflow associated with the task. |
workflowCategory |
string Task Workflow Category |
The category of the workflow associated with the task. |
workflowInstanceID |
integer(int32) Task Workflow Instance ID |
The instance ID of the workflow associated with the task. |
workflowInstanceFolio |
string Task Workflow Folio |
The folio of the workflow instance associated with the task. |
activityInstanceID |
integer(int32) Task Instance ID |
The activity instance ID of the task. |
activityInstanceDestinationID |
integer(int32) Task Destination ID |
The activity instance destination ID of the task. |
activityName |
string Task Activity Name |
The activity name of the task. |
eventName |
string Task Event Name |
The event name of the task. |
eventDescription |
string Task Event Description |
The event description of the task. |
originator |
|
|
actions |
|
|
workflowInstanceDataFields |
Task Workflow Data Fields |
The data fields of the workflow instance. |
activityDataFields |
Task Activity Data Fields |
The data fields of the activity. |
workflowInstanceXmlFields |
array of (UserDefinedXmlField) Task Workflow XML Fields |
The XML fields of the workflow instance. |
itemReferences |
Task Item References |
The item references of the workflow instance. |
instruction |
string
|
|
workflowInstanceDataFieldsString |
string Task Workflow Data Fields String |
String representaation of the data fields of the Workflow Instance. |
itemReferencesString |
string Task Item References String |
String representing the item references of the workflow instance. |
Summary: Task Workflow Data Fields
Description: The data fields of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary: Task Activity Data Fields
Description: The data fields of the activity.
Properties:
Name |
Type |
Summary |
Summary: Task Item References
Description: The item references of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
nonBatchableActions |
array of (string) Nonbatchable Actions |
List of actions that cannot be taken without assigning the task. |
batchableActions |
array of (string) Batchable Actions |
List of actions that can be taken without assigning the task. |
systemActions |
array of (string) System Actions |
List of system actions. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
serialNumber |
string Task Serial Number |
The serial number of the task. Ex: 1234_5678 |
status |
string Task Status |
The status of the task. Ex: Open, Completed, Sleep, Allocated, Available Values: [Open, Completed, Sleep, Allocated, Available] |
taskStartDate |
string(date-time) Task Start Date |
The start date of the task. |
sleepUntil |
string(date-time) Task Sleep Duration |
The date and time when the task will wake. |
priority |
integer(int32) Task Priority |
The priority of the task. |
formURL |
string Task Form URL |
The form URL of the task. |
viewFlowURL |
string Task View Flow URL |
The View Flow URL of the task. |
workflowID |
integer(int32) Task Workflow ID |
The ID of the workflow associated with the task. |
workflowName |
string Task Workflow Name |
The name of the workflow associated with the task. |
workflowDisplayName |
string Task Workflow Display Name |
The display name of the workflow associated with the task. |
workflowCategory |
string Task Workflow Category |
The category of the workflow associated with the task. |
workflowInstanceID |
integer(int32) Task Workflow Instance ID |
The instance ID of the workflow associated with the task. |
workflowInstanceFolio |
string Task Workflow Folio |
The folio of the workflow instance associated with the task. |
activityInstanceID |
integer(int32) Task Instance ID |
The activity instance ID of the task. |
activityInstanceDestinationID |
integer(int32) Task Activity Destination ID |
The activity instance destination ID of the task. |
activityName |
string Task Activity Name |
The activity name of the task. |
eventName |
string Task Event Name |
The event name of the task. |
eventDescription |
string Task Event Description |
The event description of the task. |
originator |
|
|
actions |
|
|
instruction |
string Task Instructions |
The instructions associated with the task. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
itemCount |
integer(int32) Task Count |
The count of tasks returned. |
tasks |
array of (TaskLite) Tasks |
One or more tasks. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
XmlFields |
array of (UserDefinedXmlField) XML Fields |
The XML fields of the workflow instance. |
ItemReferences |
Item References |
The Item Reference fields of the workflow instance. |
DataFields |
Data Fields |
The data fields of the workflow instance. |
Summary: Item References
Description: The Item Reference fields of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary: Data Fields
Description: The data fields of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
username |
string User Name |
User name of the person. |
fqn |
string User FQN |
Fully qualified name of the person. Ex: bob@denallix.com, K2:Denallix\Bob |
|
string User Email |
Email address of the person. |
manager |
string User Manager |
Manager of the person. |
displayName |
string User Display Name |
Display name of the person. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
RedirectTo |
string Redirect Information |
The person to whom the task is redirected. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
SleepFor |
integer(int32) Sleep For |
The number of seconds to sleep a task. |
SleepUntil |
string(date-time) Sleep Until |
The date and time to wake the task. Format: yyyy-MM-ddTHH:mm:ss:fffZ UTC |
Summary:
Description:
Properties:
Name |
Type |
Summary |
folio |
string Workflow Folio |
The folio of the workflow instance. |
expectedDuration |
integer(int32) Workflow Expected Duration |
The expected duration of the workflow instance. |
priority |
integer(int32) Workflow Priority |
The priority of the workflow instance. |
dataFields |
Workflow Data Fields |
The data fields of the workflow instance. |
xmlFields |
array of (UserDefinedXmlField) Workflow XML Fields |
The XML fields of the workflow instance. |
itemReferences |
Workflow Item References |
The item references of the workflow instance. |
workflow |
Workflow Schema |
The schema of the workflow instance. |
Summary: Workflow Data Fields
Description: The data fields of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary: Workflow Item References
Description: The item references of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary: Workflow Schema
Description: The schema of the workflow instance.
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
name |
string XML Field Name |
The name of an XML field. |
value |
string XML Field Value |
The value of the XML field. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
workflowInfo |
|
|
workflowSchema |
string Workflow Schema |
The schema of the workflow. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
name |
string Workflow Name |
The name of the workflow. |
description |
string Workflow Description |
The description of the workflow. |
folder |
string Workflow Folder |
The folder (category) of the workflow. |
systemName |
string Workflow System Name |
The system name of the workflow. |
expectedDuration |
integer(int32) Workflow Expected Duration |
The expected duration of the workflow. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
integer(int32) Workflow ID |
The ID of the workflow. |
defaultVersionId |
integer(int32) Workflow Default Version |
The default workflow version. |
name |
string Workflow Name |
The workflow name. |
folder |
string Workflow Folder |
The workflow folder. |
systemName |
string Workflow System Name |
The workflow system name. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
itemCount |
integer(int32) Item Count |
The number of workflows. |
workflows |
array of (WorkflowLabel) Workflows |
A list of workflows. |