Using the Worklist REST Service

The Worklist REST Service supports two types of serialization namely XML and JSON.  To select the type of serialization, provide the appropriate Content-Type and Accept HTTP header values.

The following MIME types are supported:

In addition, versioning is supported and can be specified by appending a MIME parameter to the Content-Type or Accept HTTP headers. 

This topic is based on version 1.0 of the Worklist REST Service.

Content-Type

The Content-Type HTTP header is required for requests that support data payloads such as POST and PUT.  This indicates the serialization used for the request only.  For example:

Content-Type
application/xml

Accept

The Accept HTTP header must be provided for all requests. This indicates the serialization for the response body only.  For example:

Accept
application/xml

Versioning

It is recommended to specify a version on all requests.  If no version is specified, the latest version of the API will automatically be used.  This may however introduce breaking changes if your code is expecting a previous version schema.

Versioning Scheme

The versioning scheme is "<major>.<minor>". 

Increments in the major version may include substantial breaking changes. Increments in the minor version will not break compatibility.

Specifying the version

To specify the version add a "version" parameter to the Content-Type or Accept HTTP headers.  For example:

Content-Type
application/xml; version=1.0

Accept
application/xml; version=1 

Where no version is specified in the header, the latest major and minor versions will automatically be used.  If only the major version is specified, the latest minor version within the major version will automatically be used.  It is recommended to always supply a minor version.

Authentication

The Worklist REST Service supports both Windows and Basic authentication.  Basic authentication can be implemented as per the RFC 2617 standard.  However, due to the conflict of K2 labels and the colon character used in Basic authentication, the username must be passed to the Worklist REST Service in one of the following formats:

Considerations

When using the Worklist REST Service, the PUT method behaves as a Merge instead of a Set on all endpoints.  This means that omitted data or fields will not be deleted, and data included will be updated.

K2 blackpearl Developers Reference4.7
Video Links Learn Support
No videos found for this article
K2 on YouTube
No Additional links found for this article
No self-learning content for this article
Try some scenarios...
No relevant support links available for this article