API Operations for Priorities

Summary

Operation Name: Retrieve a Priority by Priority ID
Relative API Request Path: ~/api/v1/priorities/{priorityID}
HTTP Verb: GET
Description: Retrieve a single Priority by Priority ID.

Operation Name: Retrieve all Priorities
Relative API Request Path: ~/api/v1/priorities
HTTP Verb: GET
Description: Retrieve a collection of currently defined Priorities.

Retrieve a Priority by Priority ID

Description: This API method retrieves a Priority from the Issuetrak data store for a specified Priority ID. The “PriorityID” parameter must correspond to an existing Priority. If there is no such Priority ID, an error message will be returned with an HTTP response status code of 404.

When retrieving a Priority using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the PriorityName returned via the API method represents the PriorityName as stored within the Issuetrak database. Thus, when retrieving a Priority created through the Issuetrak web interface where HTML encoding of the PriorityName is performed, the API consumer may desire to perform additional client-side decoding.

A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadPriorityDTO instance.

Response DTO Schema:

ReadPriorityDTO
{
 ExtensionData (array[KeyValuePair[String,Object]]),
 Metadata (array[KeyValuePair[String,Object]]),
 PriorityID (integer),
 PriorityName (string),
 DisplayOrder (number),
 Message (string),
 Color (string)
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Invalid Priority ID: 400 (Bad Request, e.g., a negative integer is supplied)
  • Non-existent Priority: 404
  • Invalid Priority ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied)

Response DTO Property Notes:

  • The ExtensionData property is not used in version 1 of the API.
  • The Metadata property provides a key/value collection of additional data about the API operation and/or the response body.
  • BREAKING CHANGES from Previous API Versions:
    • The “AutoAssignTo” (string) property has been removed as of Issuetrak API 10.0.

Sample Request URL: ~/api/v1/priorities/1

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2014-12-22T18:18:39.4719339Z”
  }
 ],
 “PriorityID”: 1,
 “PriorityName”: “High”,
 “DisplayOrder”: 2,
 “Message”: null,
 “Color”: null
}

Retrieve all Priorities

Description: This API method retrieves a collection of all currently-defined Priority entities from the Issuetrak data store.

When retrieving a Priority using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the PriorityName returned via the API method represents the PriorityName as stored within the Issuetrak database. Thus, when retrieving a Priority created through the Issuetrak web interface where HTML encoding of the PriorityName is performed, the API consumer may desire to perform additional client-side decoding.

A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadPriorityDTO instance.

Response DTO Schema:

{
 “IsPageIndexZeroBased”: false,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    “KeyValuePair[String,Object]”
   ],
   “Metadata”: [
    “KeyValuePair[String,Object]”
   ],
   “PriorityID”: 0,
   “PriorityName”: "",
   “DisplayOrder”: 0,
   “Message”: "",
   “Color”: ""
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Non-existent Priority: 404

Response DTO Property Notes:

  • The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions.
  • The PageIndex property value is always 0. This property is included for use in future API versions.
  • The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions.
  • The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions.
  • The TotalCount property value is the number of records returned in the collection.
  • The Collection property is an array containing the ReadPriorityDTO objects returned.
  • The ExtensionData property is not implemented in v1 of the API.
  • BREAKING CHANGES from Previous API Versions:
    • The “AutoAssignTo” (string) property has been removed as of Issuetrak API 10.0.

Sample Request URL: ~/api/v1/priorities/

Sample Response (abbreviated) :

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 4,
 “PageSize”: 2147483647,
 “TotalCount”: 4,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “v1”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2014-12-22T18:20:15.7665624Z”
    }
   ],
   “PriorityID”: 1,
   “PriorityName”: “High”,
   “DisplayOrder”: 2,
   “Message”: null,
   “Color”: null
  }
 ]
}