Worklist Endpoint
The Worklist is accessed via the api/worklistitem HTTP endpoint. Below are examples of worklist schemas returned for a hypothetical environment.
A single sample worklist item can be accessed via the api/worklistitem/sample HTTP endpoint. See the examples below for the schema returned from this endpoint.
JSON return schema example
{
"AssignReason": 0,
"ActivityInstanceId": 1,
"AssignReasonDetail": {
"Username": "Bob",
"Fqn": "k2:denalliX\\bob",
"Email": "bob@denallix.com",
"Manager": "K2:DENALLIX\\Codi",
"DisplayName": "Bob",
"Properties": [
{
"Name": "Twitter",
"Value": "@denallixBob"
}
]
},
"AssignedToCollection": [
{
"IsMine": false,
"User": null,
"Group": {
"GroupName": "Customer Approvers",
"GroupId": "100",
"Properties": [
{
"Name": "Description",
"Value": "Users responsible for approving customers"
}
],
"Users": null
}
},
{
"IsMine": true,
"User": {
"Username": "Bob",
"Fqn": "k2:denallix\\bob",
"Email": "bob@denallix.com",
"Manager": "K2:DENALLIX\\Codi",
"DisplayName": "Bob",
"Properties": [
{
"Name": "Twitter",
"Value": "@denallixBob"
}
]
},
"Group": null
}
],
"WorkflowParticipantsCollection": [
{
"UserDetail": {
"Username": "Anthony",
"Fqn": "k2:denallix\\anthony",
"Email": "anthony@denallix.com",
"Manager": "K2:DENALLIX\\Codi",
"DisplayName": "Anthony",
"Properties": [
{
"Name": "Twitter",
"Value": "@K2OnK2"
}
]
}
}
],
"EventDescription": "Instructions for the task",
"ProcessName": "Customer Approval",
"StartDate": "2013-10-22T12:59:18.9855168+02:00",
"DueDate": "2013-10-22T14:39:18.9825151+02:00",
"ProcessFullName": "Customer Approval\\Customer Approval",
"ProcessFolio": "Approval Process for Customer 1",
"ActivityName": "Approval Activity",
"EventName": "Approval Client Event",
"Priority": 1,
"SerialNumber": "100_18",
"Status": "Sleeping",
"Originator": {
"Username": "Mike",
"Fqn": "k2:denallix\\mike",
"Email": "mike@denallix.com",
"Manager": "K2:DENALLIX\\Codi",
"DisplayName": "Mike",
"Properties": [
{
"Name": "Twitter",
"Value": "@denallixMike"
}
]
},
"Data": "http://url/to/action/task",
"ProcessDataFields": [
{
"Name": "CustomerId",
"Value": "1"
}
],
"ProcessXmlFields": [
{
"Name": "SomeXmlField",
"Value": "<someXmlData />"
}
],
"ActivityDataFields": [
{
"Name": "Outcome",
"Value": null
},
{
"Name": "Date",
"Value": "2013-10-22T14:39:18.9785143+02:00"
}
],
"ActivityXmlFields": [
{
"Name": "SomeXmlField",
"Value": "<someXmlData />"
}
],
"ViewFlowUrl": "http://url/to/view/flow",
"CustomActions": [
{
"Name": "Approve",
"Batchable": true,
"Order": 1
},
{
"Name": "Decline",
"Batchable": true,
"Order": 1
},
{
"Name": "Interview",
"Batchable": false,
"Order": 1
}
],
"SelectedCustomAction": "Interview",
"DelegatesCollection": [
{
"UserDetail": {
"Username": "Mike",
"Fqn": "k2:denallix\\mike",
"Email": "mike@denallix.com",
"Manager": "K2:DENALLIX\\Codi",
"DisplayName": "Mike",
"Properties": [
{
"Name": "Twitter",
"Value": "@denallixMike"
}
]
},
"AllowedActions": [
{
"Name": "Approve",
"Batchable": true,
"Order": 1
},
{
"Name": "Decline",
"Batchable": true,
"Order": 1
}
]
},
{
"UserDetail": {
"Username": "Anthony",
"Fqn": "k2:denallix\\anthony",
"Email": "anthony@denallix.com",
"Manager": "K2:DENALLIX\\Codi",
"DisplayName": "Anthony",
"Properties": [
{
"Name": "Twitter",
"Value": "@K2OnK2"
}
]
},
"AllowedActions": [
{
"Name": "Decline",
"Batchable": true,
"Order": 1
}
]
}
],
"RedirectTo": {
"Username": "Mike",
"Fqn": "k2:denallix\\mike",
"Email": "mike@denallix.com",
"Manager": "K2:DENALLIX\\Codi",
"DisplayName": "Mike",
"Properties": [
{
"Name": "Twitter",
"Value": "@denallixMike"
}
]
},
"SleepUntil": "2013-10-22T16:19:18.9855168+02:00",
"ReleaseItem": false,
"AllocateItem": true,
"ProcessInstanceId": 100,
"FormUrl": "http://this/is/populated/if/data/is/a/valid/url"
}
XML return schema example
<WorklistItem
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.k2.com/2013/web/rest/worklistitem.xsd">
<ActivityDataFields>
<DataField>
<Name>Outcome</Name>
<Value i:nil="true"/>
</DataField>
<DataField>
<Name>Date</Name>
<Value>2013-10-22T14:42:30.757573+02:00</Value>
</DataField>
</ActivityDataFields>
<ActivityInstanceId>1</ActivityInstanceId>
<ActivityName>Approval Activity</ActivityName>
<ActivityXmlFields>
<XmlField>
<Name>SomeXmlField</Name>
<Value><someXmlData /></Value>
</XmlField>
</ActivityXmlFields>
<AllocateItem>true</AllocateItem>
<AssignReason>AssignedTo</AssignReason>
<AssignReasonDetail
xmlns:d2p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d2p1:DisplayName>Bob</d2p1:DisplayName>
<d2p1:Email>bob@denallix.com</d2p1:Email>
<d2p1:Fqn>k2:denallix\bob</d2p1:Fqn>
<d2p1:Manager>K2:DENALLIX\Codi</d2p1:Manager>
<d2p1:Properties>
<d2p1:Property>
<d2p1:Name>Twitter</d2p1:Name>
<d2p1:Value>@denallixBob</d2p1:Value>
</d2p1:Property>
</d2p1:Properties>
<d2p1:Username>Bob</d2p1:Username>
</AssignReasonDetail>
<AssignedToCollection>
<AssignedTo>
<Group
xmlns:d4p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d4p1:GroupId>100</d4p1:GroupId>
<d4p1:GroupName>Customer Approvers</d4p1:GroupName>
<d4p1:Properties>
<d4p1:Property>
<d4p1:Name>Description</d4p1:Name>
<d4p1:Value>Users responsible for approving customers</d4p1:Value>
</d4p1:Property>
</d4p1:Properties>
<d4p1:Users i:nil="true"/>
</Group>
<IsMine>false</IsMine>
<User
xmlns:d4p1="http://schemas.k2.com/2013/web/rest/identity.xsd" i:nil="true"/>
</AssignedTo>
<AssignedTo>
<Group
xmlns:d4p1="http://schemas.k2.com/2013/web/rest/identity.xsd" i:nil="true"/>
<IsMine>true</IsMine>
<User
xmlns:d4p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d4p1:DisplayName>Bob</d4p1:DisplayName>
<d4p1:Email>bob@denallix.com</d4p1:Email>
<d4p1:Fqn>k2:denallix\bob</d4p1:Fqn>
<d4p1:Manager>K2:DENALLIX\Codi</d4p1:Manager>
<d4p1:Properties>
<d4p1:Property>
<d4p1:Name>Twitter</d4p1:Name>
<d4p1:Value>@denallixBob</d4p1:Value>
</d4p1:Property>
</d4p1:Properties>
<d4p1:Username>Bob</d4p1:Username>
</User>
</AssignedTo>
</AssignedToCollection>
<CustomActions>
<Action>
<Batchable>true</Batchable>
<Name>Approve</Name>
<Order>1</Order>
</Action>
<Action>
<Batchable>true</Batchable>
<Name>Decline</Name>
<Order>1</Order>
</Action>
<Action>
<Batchable>false</Batchable>
<Name>Interview</Name>
<Order>1</Order>
</Action>
</CustomActions>
<Data>http://url/to/action/task</Data>
<DelegatesCollection>
<Delegate>
<AllowedActions>
<Action>
<Batchable>true</Batchable>
<Name>Approve</Name>
<Order>1</Order>
</Action>
<Action>
<Batchable>true</Batchable>
<Name>Decline</Name>
<Order>1</Order>
</Action>
</AllowedActions>
<UserDetail
xmlns:d4p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d4p1:DisplayName>Mike</d4p1:DisplayName>
<d4p1:Email>mike@denallix.com</d4p1:Email>
<d4p1:Fqn>k2:denallix\mike</d4p1:Fqn>
<d4p1:Manager>K2:DENALLIX\Codi</d4p1:Manager>
<d4p1:Properties>
<d4p1:Property>
<d4p1:Name>Twitter</d4p1:Name>
<d4p1:Value>@denallixMike</d4p1:Value>
</d4p1:Property>
</d4p1:Properties>
<d4p1:Username>Mike</d4p1:Username>
</UserDetail>
</Delegate>
<Delegate>
<AllowedActions>
<Action>
<Batchable>true</Batchable>
<Name>Decline</Name>
<Order>1</Order>
</Action>
</AllowedActions>
<UserDetail
xmlns:d4p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d4p1:DisplayName>Anthony</d4p1:DisplayName>
<d4p1:Email>anthony@denallix.com</d4p1:Email>
<d4p1:Fqn>k2:denallix\anthony</d4p1:Fqn>
<d4p1:Manager>K2:DENALLIX\Codi</d4p1:Manager>
<d4p1:Properties>
<d4p1:Property>
<d4p1:Name>Twitter</d4p1:Name>
<d4p1:Value>@K2OnK2</d4p1:Value>
</d4p1:Property>
</d4p1:Properties>
<d4p1:Username>Anthony</d4p1:Username>
</UserDetail>
</Delegate>
</DelegatesCollection>
<DueDate>2013-10-22T14:42:30.757573+02:00</DueDate>
<EventDescription>Instructions for the task</EventDescription>
<EventName>Approval Client Event</EventName>
<FormUrl>http://this/is/populated/if/data/is/a/valid/url</FormUrl>
<Originator
xmlns:d2p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d2p1:DisplayName>Mike</d2p1:DisplayName>
<d2p1:Email>mike@denallix.com</d2p1:Email>
<d2p1:Fqn>k2:denallix\mike</d2p1:Fqn>
<d2p1:Manager>K2:DENALLIX\Codi</d2p1:Manager>
<d2p1:Properties>
<d2p1:Property>
<d2p1:Name>Twitter</d2p1:Name>
<d2p1:Value>@denallixMike</d2p1:Value>
</d2p1:Property>
</d2p1:Properties>
<d2p1:Username>Mike</d2p1:Username>
</Originator>
<Priority>1</Priority>
<ProcessDataFields>
<DataField>
<Name>CustomerId</Name>
<Value>1</Value>
</DataField>
</ProcessDataFields>
<ProcessFolio>Approval Process for Customer 1</ProcessFolio>
<ProcessFullName>Customer Approval\Customer Approval</ProcessFullName>
<ProcessInstanceId>100</ProcessInstanceId>
<ProcessName>Customer Approval</ProcessName>
<ProcessXmlFields>
<XmlField>
<Name>SomeXmlField</Name>
<Value><someXmlData /></Value>
</XmlField>
</ProcessXmlFields>
<RedirectTo
xmlns:d2p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d2p1:DisplayName>Mike</d2p1:DisplayName>
<d2p1:Email>mike@denallix.com</d2p1:Email>
<d2p1:Fqn>k2:denallix\mike</d2p1:Fqn>
<d2p1:Manager>K2:DENALLIX\Codi</d2p1:Manager>
<d2p1:Properties>
<d2p1:Property>
<d2p1:Name>Twitter</d2p1:Name>
<d2p1:Value>@denallixMike</d2p1:Value>
</d2p1:Property>
</d2p1:Properties>
<d2p1:Username>Mike</d2p1:Username>
</RedirectTo>
<ReleaseItem>false</ReleaseItem>
<SelectedCustomAction>Interview</SelectedCustomAction>
<SerialNumber>100_18</SerialNumber>
<SleepUntil>2013-10-22T16:22:30.757573+02:00</SleepUntil>
<StartDate>2013-10-22T13:02:30.757573+02:00</StartDate>
<Status>Sleeping</Status>
<ViewFlowUrl>http://url/to/view/flow</ViewFlowUrl>
<WorkflowParticipantsCollection>
<WorkflowParticipant>
<UserDetail
xmlns:d4p1="http://schemas.k2.com/2013/web/rest/identity.xsd">
<d4p1:DisplayName>Anthony</d4p1:DisplayName>
<d4p1:Email>anthony@denallix.com</d4p1:Email>
<d4p1:Fqn>k2:denallix\anthony</d4p1:Fqn>
<d4p1:Manager>K2:DENALLIX\Codi</d4p1:Manager>
<d4p1:Properties>
<d4p1:Property>
<d4p1:Name>Twitter</d4p1:Name>
<d4p1:Value>@K2OnK2</d4p1:Value>
</d4p1:Property>
</d4p1:Properties>
<d4p1:Username>Anthony</d4p1:Username>
</UserDetail>
</WorkflowParticipant>
</WorkflowParticipantsCollection>
</WorklistItem>