Task/Items/Filtered
Returns a filtered and sorted collection of task items for the current user.
URI
{Service Root URI}/Task/Items/Filtered
https://api.denallix.com:443/K2Services/SyncREST.svc/Task/Items/Filtered
Method
POST
This method cannot be called via URI construction in the address bar of standard browsers. Tooling such as Fiddler or .NET code may be required to execute the POST.
Request Headers
Ensure that the request has at least these headers set.
- Authorization – Basic or NTLM (Windows)
- Content-type – application/xml
Authorization: Basic {encrypted token goes here}
Content-type: application/xml
Request Body
The request body contains the filter XML. See the Filtering and Sorting section for more information on building a valid filter XML.
Request Body Example
<?xml version="1.0" encoding="utf-8"?>
<Criteria xmlns="http://schemas.k2.com/worklist/d1">
<Filter Field="ProcessFolio" Comparison="Like" ValueType="String">Demo</Filter>
<Sort Field="ProcessStartDate" Order="Descending" />
</Criteria>
Return Type
TaskCollection or Failure
Due to the asynchronous nature of the POST, a successful call may not return anything depending on the tooling used to execute the POST.
Return Example
POST /K2Services/SyncREST.svc/Task/Items/UpdateTask
{Raw}
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 1409
Content-Type: application/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
Persistent-Auth: true
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Date: Thu, 07 Jul 2011 06:11:24 GMT
<?xml version="1.0" encoding="utf-8"?>
<TaskCollection xmlns="http://schemas.k2.com/task/d1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Task SerialNumber="12_8">
<ProcessName>Classic Rework</ProcessName>
<StartDate>2011-07-07T06:09:06.063Z</StartDate>
<ProcessFullName>K2 Examples\Classic Rework</ProcessFullName>
<ProcessFolio>Classic Rework Demo2</ProcessFolio>
<ActivityName>First Approval</ActivityName>
<Priority>1</Priority>
<Status>Available</Status>
<Originator>K2:DENALLIX\administrator</Originator>
<Data>http://DLX:81/Workspace/ClientEventPages/K2_Examples/Classic_Rework_Page_c5cc30cf.aspx?SN=12_8</Data>
<Action Name="Approved" Batchable="true"/>
<Action Name="Declined" Batchable="true"/>
<Action Name="Rework" Batchable="true"/>
</Task>
<Task SerialNumber="11_8">
<ProcessName>Classic Rework</ProcessName>
<StartDate>2011-07-06T21:35:49.087Z</StartDate>
<ProcessFullName>K2 Examples\Classic Rework</ProcessFullName>
<ProcessFolio>Classic Rework Demo1</ProcessFolio>
<ActivityName>First Approval</ActivityName>
<Priority>1</Priority>
<Status>Open</Status>
<Originator>K2:DENALLIX\administrator</Originator>
<Data>http://DLX:81/Workspace/ClientEventPages/K2_Examples/Classic_Rework_Page_c5cc30cf.aspx?SN=11_8</Data>
<Action Name="Approved" Batchable="true"/>
<Action Name="Declined" Batchable="true"/>
<Action Name="Rework" Batchable="true"/>
</Task>
</TaskCollection>