查询时区列表
查询时区列表。
请求 URL
GET {base_url}/{api_path}/timezone/list?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| page | 否 | Integer | 定义显示第几个页面。 |
| page_size | 否 | Integer | 定义每页显示几项查询结果。 |
| sort_by | 否 | String | 定义排序字段。 取值范围:
|
| order_by | 否 | String | 定义显示顺序。 取值范围:
|
| search_value | 否 | String | 用于按名称筛选时区的关键字。 |
| timezone_type | 否 | String | 定义时区类型。 取值范围:
|
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| total_number | Integer | 时区总数。 |
| data | Array <Time_Zone> | 每个时区的基本信息。 |
- Time_Zone
-
参数 类型 说明 id Integer 时区 ID。 name String PBX 中配置的时区名称。 timezone String 时区信息,包含 UTC 偏移量和时区标识符。 timezone_name String 时区显示名称。 enable_dst Integer 是否启用夏令时。 0:禁用。1:启用。
timezone_type String 时区类型。 globalcustom
feature_code String 用于切换或订阅该时区对应上下班状态的特征码。
示例
请求示例
GET /openapi/v1.0/timezone/list?access_token=UIFGAl0HUpg8i78V0Z6nCx5YghKqE235 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com响应示例HTTP/1.1 200 OK { "errcode": 0, "total_number": 2, "data": [ { "id": 1, "name": "global_timezone", "timezone": "UTC+8 Asia/Shanghai", "timezone_name": "8 China (Beijing)", "enable_dst": 0, "timezone_type": "global", "feature_code": "*99" }, { "id": 2, "name": "Japan", "timezone": "UTC+9 Asia/Tokyo", "timezone_name": "9 Japan (Tokyo)", "enable_dst": 0, "timezone_type": "custom", "feature_code": "*991" } ] }