API Operations for ServiceLevelAgreements

Summary

Operation Name: Retrieve a ServiceLevelAgreement by ServiceLevelAgreement ID
Relative API Request Path: ~/api/v1/servicelevelagreements/{serviceLevelAgreementID}
HTTP Verb: GET
Description: Retrieve a single ServiceLevelAgreement by ServiceLevelAgreement ID.

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

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

Retrieve a ServiceLevelAgreement by ServiceLevelAgreement ID

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

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

Response DTO Schema:

ReadServiceLevelAgreementDTO
{
 ExtensionData (array[CustomKeyValuePairDataElement]),
 Metadata (array[CustomKeyValuePairDataElement]),
 ServiceLevelAgreementID (integer),
 ServiceLevelID (integer),
 ClientType (string),
 ClientID (integer),
 ServiceStartDate (ISO 8601 string),
 ServiceEndDate (ISO 8601 string),
 DefaultSeverityID (integer)
}
CustomKeyValuePairDataElement
{
 Key (string),
 Value (string)
}

Request HTTP Verb: GET

Response Status Codes:

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

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2015-02-10T15:14:13.9131436Z”
  }
 ],
 “ServiceLevelAgreementID”: 1,
 “ServiceLevelID”: 1,
 “ClientType”: “Org”,
 “ClientID”: 1,
 “ServiceStartDate”: “2015-01-01T00:00:00”,
 “ServiceEndDate”: “2050-12-31T00:00:00”,
 “DefaultSeverityID”: 1
}

Retrieve all ServiceLevelAgreements

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

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

Response DTO Schema:

{
 “IsPageIndexZeroBased”: false,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    {
     “Key”: "",
     “Value”: "" 
    }
   ],
   “Metadata”: [
    {
     “Key”: "",
     “Value”: ""
    }
   ],
   “ServiceLevelAgreementID”: 0,
   “ServiceLevelID”: 0,
   “ClientType”: "",
   “ClientID”: 0,
   “ServiceStartDate”: “ISO 8601 string”,
   “ServiceEndDate”: “ISO 8601 string”,
   “DefaultSeverityID”: 0
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

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

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

Sample Response:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 1,
 “PageSize”: 2147483647,
 “TotalCount”: 1,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “v1”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2015-02-10T15:15:17.5675084Z”
    }
   ],
   “ServiceLevelAgreementID”: 1,
   “ServiceLevelID”: 1,
   “ClientType”: “Org”,
   “ClientID”: 1,
   “ServiceStartDate”: “2015-01-01T00:00:00”,
   “ServiceEndDate”: “2050-12-31T00:00:00”,
   “DefaultSeverityID”: 1
  }
 ]
}