API Operations for ServiceLevels

Summary

Operation Name: Retrieve a ServiceLevel by ServiceLevel ID
Relative API Request Path: ~/api/v1/servicelevels/{serviceLevelID}
HTTP Verb: GET
Description: Retrieve a single ServiceLevel by ServiceLevel ID.

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

Retrieve a ServiceLevel by ServiceLevel ID

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

When retrieving a ServiceLevel using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the ServiceLevel Name returned via the API method represents the ServiceLevel Name as stored within the Issuetrak database. Thus, when retrieving a ServiceLevel created through the Issuetrak web interface where HTML encoding of the ServiceLevelName 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 ReadServiceLevelDTO instance.

Response DTO Schema:

ReadServiceLevelDTO
{
 ExtensionData (array[CustomKeyValuePairDataElement]),
 Metadata (array[CustomKeyValuePairDataElement]),
 ServiceLevelID (integer),
 ServiceLevel (string),
 DisplayOrder (number),
 Comment (string),
 IsInactive (boolean)
}
CustomKeyValuePairDataElement
{
 Key (string),
 Value (string)
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Invalid ServiceLevel ID: 400 (Bad Request, e.g., a negative integer is supplied)
  • Non-existent Cause: 404
  • Invalid ServiceLevel 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.

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

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2015-02-09T18:14:06.1227057Z”
  }
 ],
 “ServiceLevelID”: 1,
 “ServiceLevel”: “Default Service Level”,
 “DisplayOrder”: 1,
 “Comment”: “Default Service Level”,
 “IsInactive”: null
}

Retrieve all ServiceLevels

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

When retrieving a ServiceLevel using the API, no special character decoding (e.g., HTML decoding &lt; as < or &gt; as >) is performed. Therefore, please note that the ServiceLevelName returned via the API method represents the ServiceLevelName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the ServiceLevelName 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 ReadServiceLevelDTO instance.

Response DTO Schema:

{
 “IsPageIndexZeroBased”: false,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    {
     “Key”: "",
     “Value”: ""
    }
   ],
   “Metadata”: [
    {
     “Key”: "",
     “Value”: ""
    }
   ],
   “ServiceLevelID”: 0,
   “ServiceLevel”: "",
   “DisplayOrder”: 0,
   “Comment”: "",
   “IsInactive”: false
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Non-existent ServiceLevel: 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 ReadServiceLevelDTO objects returned.
  • The ExtensionData property is not implemented in v1 of the API.

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

Sample Response:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 1,
 “PageSize”: 2147483647,
 “TotalCount”: 1,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “v1”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2015-02-09T18:14:57.5088438Z”
    }
   ],
   “ServiceLevelID”: 1,
   “ServiceLevel”: “Default Service Level”,
   “DisplayOrder”: 1,
   “Comment”: “Default Service Level”,
   “IsInactive”: null
  }
 ]
}