Time Zone Groups Resource
The following requests are supported for operations with time zone groups via actiTIME API:
GET/timeZoneGroups/{id}
GET/timeZoneGroups/default
GET/timeZoneGroups
Time Zone Group Properties
Time zone group properties available via API:
| Property | Description | 
|---|---|
| id | Unique time zone group identifier. The default time zone group always has the ID=‘-1’. | 
| name | Time zone group name. | 
| timeZoneId | Time Zone ID in IANA Time Zone Database format. | 
| default | Shows whether the returned time zone group is the default group or not. Possible values: true, false. | 
Retrieve Time Zone Group Properties
Use the following request to retrieve properties of the time zone group with given ID:
GET/timeZoneGroups/{id}
Example Request:
curl -X GET "<actiTIME URL>/api/v1/timeZoneGroups/2" -H "accept: application/json; charset=UTF-8" -u "username:password"
Example Response:
{
  "id": 2,
  "name": "London",
  "timeZoneId": "Europe/London",
  "default": false
}
More info on using this request is available in Swagger at the following URL:
<your actiTIME URL>/api/v1/swagger
Retrieve Default Time Zone Group
Use the following request to retrieve the default time zone group:
GET/timeZoneGroups/default
Example Request:
curl -X GET "<actiTIME URL>/api/v1/timeZoneGroups/default" -H "accept: application/json; charset=UTF-8" -u "username:password"
Example Response:
{
  "id": -1,
  "name": "New York",
  "timeZoneId": "America/New_York",
  "default": true
}
More info on using this request is available in Swagger at the following URL:
<your actiTIME URL>/api/v1/swagger
Retrieve List of Time Zone Groups
Use the following request to retrieve a list of time zone groups with their properties:
GET/timeZoneGroups
The request can be specified with several parameters:
| Parameter | Description | 
|---|---|
| offset | Pagination offset. If provided, first n time zone groups will be not shown in the list. | 
| limit | Pagination limit. If provided, the number of returned time zone groups will be limited to n. If not provided, the default value (1000) is used. | 
| name | If provided, only the time zone group with exact name match will be returned. | 
| sort | Sets sorting of the results. Time zone groups can be sorted by name only. | 
Example Request:
curl -X GET "<actiTIME URL>/api/v1/timeZoneGroups?offset=0&limit=1000&sort=%2Bname" -H "accept: application/json; charset=UTF-8" -u "username:password"
Example Response:
{
  "offset": 0,
  "limit": 1000,
  "items": [
    {
      "id": 2,
      "name": "London",
      "timeZoneId": "Europe/London",
      "default": false
    },
    {
      "id": -1,
      "name": "New York",
      "timeZoneId": "America/New_York",
      "default": true
    },
    {
      "id": 3,
      "name": "Sydney",
      "timeZoneId": "Australia/Sydney",
      "default": false
    }
  ]
}
More info on using this request is available in Swagger at the following URL:
<your actiTIME URL>/api/v1/swagger