Del via


K2 Workflow (Preview)

Use the K2 Workflow API service to remotely work with workflows and tasks.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Standard All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Standard All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
URL https://portal.k2.com/ticket/default
Connector Metadata
Publisher K2
Website https://www.k2.com
Privacy policy https://www.k2.com/legal/privacy-policy

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Not shareable

Default

Applicable: All regions

Parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

Name Type Description Required
K2 URL string Your K2 URL (Example: https://[K2ID].onk2.com). True
Username securestring The username for this api True
Password securestring The password for this api True

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Action Task

Performs a workflow action.

Assign Task

Assigns a task to the current user.

Finish Server Event

Send a finish response to an async server task awaiting a response

Get Server Event

Gets a server event by serial number.

Get Task

Gets a task by serial number.

Get Task Actions

Gets a list of actions for the task.

Get Tasks

Obtain a list of tasks available to the connected user.

Get Workflow

Gets a workflow definition by ID.

Get Workflows

Get a list of available workflows.

Redirect Task

Sends a task to another person.

Release Task

Releases a task.

Sleep Task

Sleeps a task for a duration, either number of seconds or until a date.

Start Workflow

Creates and starts a new workflow instance.

Wake Task

Awakens a sleeping task.

Action Task

Performs a workflow action.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Custom Action
customAction True string

The task action, defined by the workflow.

XML Field Name
name string

The name of an XML field.

XML Field Value
value string

The value of the XML field.

Item References
ItemReferences object

The Item Reference fields of the workflow instance.

Data Fields
DataFields object

The data fields of the workflow instance.

Assign Task

Assigns a task to the current user.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Returns

response
object

Finish Server Event

Send a finish response to an async server task awaiting a response

Parameters

Name Key Required Type Description
Server Event Serial Number
serialNumber True string

The serial number of the server event. Ex: 1234_5678

XML Field Name
name string

The name of an XML field.

XML Field Value
value string

The value of the XML field.

Item References
ItemReferences object

The Item Reference fields of the workflow instance.

Data Fields
DataFields object

The data fields of the workflow instance.

Get Server Event

Gets a server event by serial number.

Parameters

Name Key Required Type Description
Server Event Serial Number
serialNumber True string

The serial number of the server event. Ex: 1234_5678.

Returns

Get Task

Gets a task by serial number.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Returns

Body
Task

Get Task Actions

Gets a list of actions for the task.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Returns

Get Tasks

Obtain a list of tasks available to the connected user.

Parameters

Name Key Required Type Description
All, Allocated, Sleeping, SharedFrom, SharedTo
state string

Returns list of tasks for the connected user.

Returns

Get Workflow

Gets a workflow definition by ID.

Parameters

Name Key Required Type Description
Workflow ID
id True integer

The ID of the workflow.

Returns

Get Workflows

Get a list of available workflows.

Parameters

Name Key Required Type Description
Workflow Type
type string

The type of workflow. Startable or Owned.

Returns

Redirect Task

Sends a task to another person.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Redirect Information
RedirectTo True string

The person to whom the task is redirected.

Release Task

Releases a task.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Sleep Task

Sleeps a task for a duration, either number of seconds or until a date.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Sleep For
SleepFor integer

The number of seconds to sleep a task.

Sleep Until
SleepUntil date-time

The date and time to wake the task. Format: yyyy-MM-ddTHH:mm:ss:fffZ UTC

Start Workflow

Creates and starts a new workflow instance.

Parameters

Name Key Required Type Description
Workflow ID
id True integer

Specify a workflow ID to start instance.

Workflow Instance Details
instance True dynamic

Send workflow instance object to start workflow.

Returns

response
integer

Wake Task

Awakens a sleeping task.

Parameters

Name Key Required Type Description
Serial Number
serialNumber True string

The serial number of the task. Ex: 1234_5678

Returns

response
object

Definitions

ServerEventDataResponse

Name Path Type Description
Server Event Serial Number
serialNumber string

The serial number of the server event. Ex: 1234_5678

Server Event Workflow ID
workflowID integer

The ID of the workflow associated with the server event.

Server Event Workflow Name
workflowName string

The name of the workflow associated with the server event.

Server Event Workflow Display Name
workflowDisplayName string

The display name of the workflow associated with the server event.

Server Event Workflow Category
workflowCategory string

The category of the workflow associated with the server event.

Server Event Workflow Instance ID
workflowInstanceID integer

The instance ID of the workflow associated with the server event.

Server Event Workflow Folio
workflowInstanceFolio string

The folio of the workflow instance associated with the server event.

Server Event Activity Instance ID
activityInstanceID integer

The activity instance ID of the server event.

Server Event Activity Destination ID
activityInstanceDestinationID integer

The activity instance destination ID of the server event.

Server Event Activity Name
activityName string

The activity name of the server event.

Server Event Event Name
eventName string

The event name of the server event.

Server Event Event Description
eventDescription string

The event description of the server event.

originator
originator User
eventInstance
eventInstance EventInstanceWrapper
Server Event Activity Data Fields
dataFields object

The data fields of the activity.

Server Event Activity XML Fields
xmlFields array of UserDefinedXmlField

The XML fields of the activity.

Server Event Item References
itemReferences object

The item references of the workflow instance.

Server Event Workflow Data Fields String
workflowInstanceDataFieldsString string

String representaation of the data fields of the Workflow Instance.

Server Event Item References String
itemReferencesString string

String representing the item references of the workflow instance.

viewFlowURL
viewFlowURL string

EventInstance

Name Path Type Description
Event Instance Start Date
StartDate date-time

Date and time the event instance started.

Event Instance Expected Duration
ExpectedDuration integer

Expected duration of the event instance.

Event Instance Priority
Priority integer

Priority of the event instance.

Event Instance Metadata
MetaData string

Metadata for the event instance.

Event Instance Description
Description string

Description of the event instance.

Event Instance Name
Name string

Name of the event instance.

Event Instance ID
ID integer

ID of the event instance.

UserDefinedXmlField

Name Path Type Description
XML Field Name
name string

The name of an XML field.

XML Field Value
value string

The value of the XML field.

TasksResponse

Name Path Type Description
Task Count
itemCount integer

The count of tasks returned.

Tasks
tasks array of TaskLite

One or more tasks.

TaskLite

Name Path Type Description
Task Serial Number
serialNumber string

The serial number of the task. Ex: 1234_5678

Task Status
status string

The status of the task. Ex: Open, Completed, Sleep, Allocated, Available

Task Start Date
taskStartDate date-time

The start date of the task.

Task Sleep Duration
sleepUntil date-time

The date and time when the task will wake.

Task Priority
priority integer

The priority of the task.

Task Form URL
formURL string

The form URL of the task.

Task View Flow URL
viewFlowURL string

The View Flow URL of the task.

Task Workflow ID
workflowID integer

The ID of the workflow associated with the task.

Task Workflow Name
workflowName string

The name of the workflow associated with the task.

Task Workflow Display Name
workflowDisplayName string

The display name of the workflow associated with the task.

Task Workflow Category
workflowCategory string

The category of the workflow associated with the task.

Task Workflow Instance ID
workflowInstanceID integer

The instance ID of the workflow associated with the task.

Task Workflow Folio
workflowInstanceFolio string

The folio of the workflow instance associated with the task.

Task Instance ID
activityInstanceID integer

The activity instance ID of the task.

Task Activity Destination ID
activityInstanceDestinationID integer

The activity instance destination ID of the task.

Task Activity Name
activityName string

The activity name of the task.

Task Event Name
eventName string

The event name of the task.

Task Event Description
eventDescription string

The event description of the task.

originator
originator User
actions
actions TaskActionsResponse
Task Instructions
instruction string

The instructions associated with the task.

User

Name Path Type Description
User Name
username string

User name of the person.

User FQN
fqn string

Fully qualified name of the person. Ex: bob@denallix.com, K2:Denallix\Bob

User Email
email string

Email address of the person.

User Manager
manager string

Manager of the person.

User Display Name
displayName string

Display name of the person.

TaskActionsResponse

Name Path Type Description
Nonbatchable Actions
nonBatchableActions array of string

List of actions that cannot be taken without assigning the task.

Batchable Actions
batchableActions array of string

List of actions that can be taken without assigning the task.

System Actions
systemActions array of string

List of system actions.

Task

Name Path Type Description
Task Serial Number
serialNumber string

The serial number of the task. Ex: 1234_5678

Task Status
status string

The status of the task. Ex: Open, Completed, Sleep, Allocated, Available

Task Start Date
taskStartDate date-time

The start date of the task.

Task Sleep Duration
sleepUntil date-time

The date and time when the task will wake.

Task Priority
priority integer

The priority of the task.

Task Form URL
formURL string

The form URL of the task.

Task View Flow URL
viewFlowURL string

The View Flow URL of the task.

Task Workflow ID
workflowID integer

The ID of the workflow associated with the task.

Task Workflow Name
workflowName string

The name of the workflow associated with the task.

Task Workflow Display Name
workflowDisplayName string

The display name of the workflow associated with the task.

Task Workflow Category
workflowCategory string

The category of the workflow associated with the task.

Task Workflow Instance ID
workflowInstanceID integer

The instance ID of the workflow associated with the task.

Task Workflow Folio
workflowInstanceFolio string

The folio of the workflow instance associated with the task.

Task Instance ID
activityInstanceID integer

The activity instance ID of the task.

Task Destination ID
activityInstanceDestinationID integer

The activity instance destination ID of the task.

Task Activity Name
activityName string

The activity name of the task.

Task Event Name
eventName string

The event name of the task.

Task Event Description
eventDescription string

The event description of the task.

originator
originator User
actions
actions TaskActionsResponse
Task Workflow Data Fields
workflowInstanceDataFields object

The data fields of the workflow instance.

Task Activity Data Fields
activityDataFields object

The data fields of the activity.

Task Workflow XML Fields
workflowInstanceXmlFields array of UserDefinedXmlField

The XML fields of the workflow instance.

Task Item References
itemReferences object

The item references of the workflow instance.

instruction
instruction string
Task Workflow Data Fields String
workflowInstanceDataFieldsString string

String representaation of the data fields of the Workflow Instance.

Task Item References String
itemReferencesString string

String representing the item references of the workflow instance.

WorkflowLabelsResponse[WorkflowLabel]

Name Path Type Description
Item Count
itemCount integer

The number of workflows.

Workflows
workflows array of WorkflowLabel

A list of workflows.

WorkflowLabel

Name Path Type Description
Workflow ID
id integer

The ID of the workflow.

Workflow Default Version
defaultVersionId integer

The default workflow version.

Workflow Name
name string

The workflow name.

Workflow Folder
folder string

The workflow folder.

Workflow System Name
systemName string

The workflow system name.

WorkflowDataResponse

Name Path Type Description
workflowInfo
workflowInfo WorkflowDefinition
Workflow Schema
workflowSchema string

The schema of the workflow.

WorkflowDefinition

Name Path Type Description
Workflow Name
name string

The name of the workflow.

Workflow Description
description string

The description of the workflow.

Workflow Folder
folder string

The folder (category) of the workflow.

Workflow System Name
systemName string

The system name of the workflow.

Workflow Expected Duration
expectedDuration integer

The expected duration of the workflow.

EventInstanceWrapper

Name Path Type Description
EventInstance
EventInstance EventInstance
Event Instance Description
Description string

Description of the event instance.

Event Instance Expected Duration
ExpectedDuration integer

Expected duration of the event instance.

Event Instance ID
ID integer

ID of the event instance.

Event Instance Metadata
MetaData string

Metadata for the event instance.

Event Instance Name
Name string

Name of the event instance.

Event Instance Priority
Priority integer

Priority of the event instance.

Event Instance Start Date
StartDate date-time

Date and time the event instance started.

integer

This is the basic data type 'integer'.

object

This is the type 'object'.