QBOS REST API documentation (workitem)

(return to Main Document)

Introduction

The workitem API allows client applications to maintain workitem data including any part of its demographic record sets.

Audience

This developer's guide is intended for software developers needing a technical reference for using the QBOS REST API. The information you find in this guide is written by software engineering, and is authoritative on how the API behaves.

Additional resources, information about this guide

Occasionally, we make a mistake in this documentation, or unknowingly break a feature that you depend on. If this has happened to you, we apologize! You can help us fix the issue by contacting us. We appreciate your help.

Getting Started

To place any request in QBOS API application from third party application you need to authenticate user account and set/calculate values for the following request headers: x-qbos-id, x-qbos-nonce, x-qbos-date-utc, x-qbos-hash-version, x-qbos-auth

See details in Authentication Documentation.

workitem properties

Properties prefixed with '_' (underscore) are read-only properties. i.e. POST and PUT processing will ignore these properties.

Name Type Max length Numeric Required
For POST
Filterable Description

id

bigint

 

 

 

Required for GET(by id),PUT,DELETE

parent_id

bigint

 

yes

 

parent_type

nvarchar

50

 

yes

 

type

nvarchar

50

 

 

 

Value is "workitem"

_title

varchar

120

 

 

 

_body

varchar

 

 

 

_project_id

int

 

 

 

_status

int

 

yes

 

Status

_pct_work_complete

smallint

 

 

 

_estimated_start_datetime

char

20

 

 

 

_estimated_finish_datetime

char

20

 

 

 

_create_datetime

char

20

 

 

 

_owner_name

nvarchar

144

 

 

 

owner_id

bigint

 

yes

 

Read workitem by id:

GET https:/.../v1/o/workitem/{id}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

Response data: GET https:/.../v1/o/workitem/158282
{ "linked" : {"workitem_humanresource":[ {"parent_type":"workitem","parent_id":"158282","type":"workitem_humanresource","id":"149342","sub_type":"","humanresource_id":"550881","href":"\/v1\/o\/workitem_humanresource\/149342","href_humanresource":"\/v1\/o\/humanresource\/550881","_title":"Della Miller","cost_to_client_unit_type":"h","cost_to_client_per_unit":"0.0000","est_secs":"36000"}],"workitem_workgroup":[]}, "parent_type" : "project", "parent_id" : 1114, "type" : "workitem", "id" : 158282, "sub_type" : "", "_title" : "schedule appointment", "_body" : "", "_project_id" : 1114, "_status" : 0, "_pct_work_complete" : 0, "_estimated_start_datetime" : "2012-04-04T18:03:13Z", "_estimated_finish_datetime" : "2017-04-04T18:03:13Z", "_create_datetime" : "2012-04-04T18:03:00Z", "_owner_name" : "Della Miller", "owner_id" : 550881, "href" : "\/v1\/o\/workitem\/158282" }

Read workitem from parent:

GET https:/.../v1/o/{parent_type}/{parent_id}/links/workitem[?{filter}]

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

GET https:/.../v1/o/project/1114/links/workitem
Response example is shown in XML format here even though REST API returns JSON format:
<workitem><workitem parent_type="project" parent_id="1114" type="workitem" id="158282" sub_type="" _title="schedule appointment" href="/v1/o/workitem/158282"/></workitem>

Update workitem:

PUT https:/.../v1/o/workitem/{id}

Request data [See properties]:

{"workitem": [ { "id" : 158282, "property_a" : "value-a", "property" : "See workitem properties", "property_z" : "value-z" } ] }

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 200 - OK Content returned [See response data]
  • 204 - OK No content
  • 404 - Not found