API Operations for TimeZones

Summary

Operation Name: Retrieve a TimeZone by TimeZone ID
Relative API Request Path: ~/api/v1/timezones/{timeZoneID}
HTTP Verb: GET
Description: Retrieve a single TimeZone by TimeZone ID.

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

Retrieve a TimeZone by TimeZone ID

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

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

Response DTO Schema:

ReadTimeZoneDTO
{
 “ExtensionData”: [
  {
   “Key”: “string”,
   “Value”: {}
  }
 ],
 “Metadata”: [
  “CustomKeyValuePairDataElement”
 ],
 “TimeZoneID”: 0,
 “TimeZone”: “string”,
 “Display”: “string”,
 “DaylightDisplay”: “string”,
 “DaylightAbbreviation”: “string”,
 “StandardDisplay”: “string”,
 “StandardAbbreviation”: “string”,
 “Bias”: 0,
 “DaylightBias”: 0,
 “StandardBias”: 0,
 “DaylightYear”: 0,
 “DaylightMonth”: 0,
 “DaylightDOWCount”: 0,
 “DaylightDayOfWeek”: 0,
 “DaylightHour”: 0,
 “DaylightMinute”: 0,
 “DaylightSecond”: 0,
 “DaylightMillisecond”: 0,
 “StandardYear”: 0,
 “StandardMonth”: 0,
 “StandardDOWCount”: 0,
 “StandardDayOfWeek”: 0,
 “StandardHour”: 0,
 “StandardMinute”: 0,
 “StandardSecond”: 0,
 “StandardMillisecond”: 0
}
CustomKeyValuePairDataElement
{
 Key (string),
 Value (string)
}

Request HTTP Verb: GET

Response Status Codes:

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

Sample Response:

{
 “ExtensionData”: [],
 “Metadata”: [
  {
   “Key”: “APIVersion”,
   “Value”: “v1”
  },
  {
   “Key”: “QueryDate”,
   “Value”: “2015-03-12T15:22:49.0895913Z”
  }
 ],
 “TimeZoneID”: 1,
 “TimeZone”: “Afghanistan Standard Time”,
 “Display”: “(GMT+04:30) Kabul”,
 “DaylightDisplay”: “Afghanistan Daylight Time”,
 “DaylightAbbreviation”: null,
 “StandardDisplay”: “Afghanistan Standard Time”,
 “StandardAbbreviation”: null,
 “Bias”: -270,
 “DaylightBias”: -60,
 “StandardBias”: 0,
 “DaylightYear”: 0,
 “DaylightMonth”: 0,
 “DaylightDOWCount”: 0,
 “DaylightDayOfWeek”: 0,
 “DaylightHour”: 0,
 “DaylightMinute”: 0,
 “DaylightSecond”: 0,
 “DaylightMillisecond”: 0,
 “StandardYear”: 0,
 “StandardMonth”: 0,
 “StandardDOWCount”: 0,
 “StandardDayOfWeek”: 0,
 “StandardHour”: 0,
 “StandardMinute”: 0,
 “StandardSecond”: 0,
 “StandardMillisecond”: 0
}

Retrieve all TimeZones

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

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

Response DTO Schema:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 0,
 “PageSize”: 0,
 “TotalCount”: 0,
 “Collection”: [
  {
   “ExtensionData”: [
    {
     “Key”: “string”,
     “Value”: {}
    }
   ],
   “Metadata”: [
    “CustomKeyValuePairDataElement”
   ],
   “TimeZoneID”: 0,
   “TimeZone”: “string”,
   “Display”: “string”,
   “DaylightDisplay”: “string”,
   “DaylightAbbreviation”: “string”,
   “StandardDisplay”: “string”,
   “StandardAbbreviation”: “string”,
   “Bias”: 0,
   “DaylightBias”: 0,
   “StandardBias”: 0,
   “DaylightYear”: 0,
   “DaylightMonth”: 0,
   “DaylightDOWCount”: 0,
   “DaylightDayOfWeek”: 0,
   “DaylightHour”: 0,
   “DaylightMinute”: 0,
   “DaylightSecond”: 0,
   “DaylightMillisecond”: 0,
   “StandardYear”: 0,
   “StandardMonth”: 0,
   “StandardDOWCount”: 0,
   “StandardDayOfWeek”: 0,
   “StandardHour”: 0,
   “StandardMinute”: 0,
   “StandardSecond”: 0,
   “StandardMillisecond”: 0
  }
 ]
}

Request HTTP Verb: GET

Response Status Codes:

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

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

Sample Response:

{
 “IsPageIndexZeroBased”: true,
 “PageIndex”: 0,
 “CountForPage”: 1,
 “PageSize”: 2147483647,
 “TotalCount”: 1,
 “Collection”: [
  {
   “ExtensionData”: [],
   “Metadata”: [
    {
     “Key”: “APIVersion”,
     “Value”: “v1”
    },
    {
     “Key”: “QueryDate”,
     “Value”: “2015-03-12T15:20:31.6548492Z”
    }
   ],
   “TimeZoneID”: 1,
   “TimeZone”: “Afghanistan Standard Time”,
   “Display”: “(GMT+04:30) Kabul”,
   “DaylightDisplay”: “Afghanistan Daylight Time”,
   “DaylightAbbreviation”: null,
   “StandardDisplay”: “Afghanistan Standard Time”,
   “StandardAbbreviation”: null,
   “Bias”: -270,
   “DaylightBias”: -60,
   “StandardBias”: 0,
   “DaylightYear”: 0,
   “DaylightMonth”: 0,
   “DaylightDOWCount”: 0,
   “DaylightDayOfWeek”: 0,
   “DaylightHour”: 0,
   “DaylightMinute”: 0,
   “DaylightSecond”: 0,
   “DaylightMillisecond”: 0,
   “StandardYear”: 0,
   “StandardMonth”: 0,
   “StandardDOWCount”: 0,
   “StandardDayOfWeek”: 0,
   “StandardHour”: 0,
   “StandardMinute”: 0,
   “StandardSecond”: 0,
   “StandardMillisecond”: 0
  }
 ]
}