Task/Items/UpdateTask

Updates a single task with the data posted.

Only actions which have been configured to support batch processing can be updated via the Task service.  Use the Worklist service to action items that do not support batch processing.

URI

{Service Root URI}/Task/Items/UpdateTask
https://api.denallix.com:443/K2Services/SyncREST.svc/Task/Items/UpdateTask

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.

Only XML requests are allowed JSON requests will result in a 202 Status code and the task will NOT be updated.

Request Headers

Ensure that the request has at least these headers set.

Authorization: Basic {encrypted token goes here}
Content-type: application/xml

Request Body

The request body contains the UpdateTask item represented as XML.  The Task item XML returned from Task GET methods can be used as a starting point for the XML input of this POST method.  Any invalid elements or attributes will be ignored.

The UpdateTask XML consists of the following.

Namespaces

The UpdateTask XML requires namespaces to be defined.

Elements and Attributes

<?xml version="1.0" encoding="utf-8"?>
<t:UpdateTask xmlns:t="http://schemas.k2.com/task/d1" xmlns:p="http://schemas.k2.com/process/d1" Action="a:Rework">
 <t:Task SerialNumber="2_24" >
  <p:ProcessDataField Name="MyProcessDataField">Some process data value</p:ProcessDataField>
  <p:ProcessXmlField Name="MyProcXmlField">&lt;XmlDocument&gt;Some Process XML document&lt;/XmlDocument&gt;</p:ProcessXmlField>
  <p:ActivityDataField Name="MyActDataField">Some activity data value</p:ActivityDataField>
  <p:ActivityXmlField Name="MyActXmlField">&lt;XmlDocument&gt;Some Activity XML document&lt;/XmlDocument&gt;</p:ActivityXmlField>
 </t:Task>
</t:UpdateTask>

Return Type

Success/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.

POST /K2Services/SyncREST.svc/Task/Items/UpdateTask

{Raw}
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 0
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Date: Wed, 16 Feb 2011 03:01:36 GMT