API Operations for ServiceLevelTerms

Summary

Operation Name: Retrieve a ServiceLevelTerm by ServiceLevelTerm ID
Relative API Request Path: ~/api/v1/servicelevelterms/{serviceLevelTermID}
HTTP Verb: GET
Description: Retrieve a single ServiceLevelTerm by ServiceLevelTerm ID.

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

Licensing Note: Access to the API operations for Service Level Agreements is only available for the Issuetrak Ultimate license tier.

Retrieve a ServiceLevelTerm by ServiceLevelTerm ID

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

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

Response DTO Schema:

ReadServiceLevelTermDTO
{
 ExtensionData (array[CustomKeyValuePairDataElement]),
 Metadata (array[CustomKeyValuePairDataElement]),
 ServiceLevelTermID (integer),
 ServiceLevelID (integer),
 SeverityID (integer),
 ResponseTime (integer),
 ResolutionTime (integer),
 CoverageStartDay (integer),
 CoverageEndDay (integer),
 Comment (string),
 CanUseSystemOffDates (boolean)
}
CustomKeyValuePairDataElement
{
 Key (string),
 Value (string)
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Invalid ServiceLevelTerm ID: 400 (Bad Request, e.g., a negative integer is supplied)
  • Non-existent Cause: 404
  • Invalid ServiceLevelTerm 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.
  • The CoverageStartDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday, …, 7 representing Sunday.
  • The CoverageEndDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday, …, 7 representing Sunday.

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

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2015-02-09T15:46:07.8521238Z” 
  }
 ],
 “ServiceLevelTermID”: 1,
 “ServiceLevelID”: 1,
 “SeverityID”: 3,
 “ResponseTime”: 10,
 “ResolutionTime”: 30,
 “CoverageStartTime”: “1899-12-30T00:00:00”,
 “CoverageEndTime”: “1899-12-30T23:59:00”,
 “CoverageStartDay”: 1,
 “CoverageEndDay”: 7,
 “Comment”: “Test Comment”,
 “CanUseSystemOffDates”: true
}

Retrieve all ServiceLevelTerms

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

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

Response DTO Schema:

{
 “IsPageIndexZeroBased”: false,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    {
     “Key”: "",
     “Value”: ""
    }
   ],
   “Metadata”: [
    {
     “Key”: "",
     “Value”: ""
    }
   ],
   “ServiceLevelTermID”: 0,
   “ServiceLevelID”: 0,
   “SeverityID”: 0,
   “ResponseTime”: 0,
   “ResolutionTime”: 0,
   “CoverageStartDay”: 0,
   “CoverageEndDay”: 0,
   “Comment”: "",
   “CanUseSystemOffDates”: false
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

  • Success: 200
  • Non-existent ServiceLevelTerm: 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 ReadServiceLevelTermDTO objects returned.
  • The ExtensionData property is not implemented in v1 of the API.
  • The CoverageStartDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday, …, 7 representing Sunday.
  • The CoverageEndDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday, …, 7 representing Sunday.

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

Sample Response:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 1,
 “PageSize”: 2147483647,
 “TotalCount”: 1,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “v1”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2015-02-09T15:44:45.3778772Z”
    }
   ],
   “ServiceLevelTermID”: 1,  
   “ServiceLevelID”: 1,
   “SeverityID”: 3,
   “ResponseTime”: 10,
   “ResolutionTime”: 30,
   “CoverageStartTime”: “1899-12-30T00:00:00”,
   “CoverageEndTime”: “1899-12-30T23:59:00”,
   “CoverageStartDay”: 1,
   “CoverageEndDay”: 7,
   “Comment”: “Test Comment”,
   “CanUseSystemOffDates”: true
  }
 ]
}