搜索特定呼出路由
在呼出路由列表中搜索特定呼出路由。
请求 URL
GET {base_url}/{api_path}/outbound_route/search?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| page | 否 | Integer | 定义显示第几个页面。 |
| page_size | 否 | Integer | 定义每页显示几项查询结果。 |
| sort_by | 否 | String | 定义排序字段。 取值范围:
|
| order_by | 否 | String | 定义显示顺序。 取值范围:
|
| search_value | 否 | String | 搜索关键字。 |
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| total_number | Integer | 搜索到的呼出路由总数。 |
| last_pos | Integer | 呼出路由列表排序最大值。 |
| data | Array<Outroute_Info> | 呼出路由基本信息。 |
- Outroute_Info
-
参数 类型 说明 id Integer 呼出路由的唯一 ID。 name String 呼出路由名称。 dial_pattern Array<String> 呼出路由呼出号码匹配规则。 trunk Array<Trunk_List> 呼出路由选择的中继列表。 pos Integer 呼出路由在列表中的当前位置。 available_time
String
呼出路由的可用时间。
always:总是可用。global:使用各时区配置的办公时间。route_scope:使用自定义办公时间。custom:使用自定义时间段。
enb_holiday
Integer
是否允许在节假日期间使用呼出路由。
0:禁用1:启用
enb_office_time
Integer
是否允许在办公时间使用呼出路由。0:禁用1:启用
enb_out_of_office_time
Integer
是否允许在非办公时间使用呼出路由。0:禁用1:启用
office_time_list
Array<Time_Setting> 自定义办公时间设置。
timezone_id
Integer
时区 ID。
- Trunk_List
-
参数 类型 说明 id Integer 中继唯一 ID。 name String 中继名称。 - Time_Setting
-
参数 类型 说明 months String 办公时间适用的月份。 all:每月jan:一月feb:二月mar:三月apr:四月may:五月jun:六月jul:七月aug:八月sep:九月oct:十月nov:十一月dec:十二月
days_of_week String 办公时间适用的星期。 all:每天sun:周日mon:周一tue:周二wed:周三thu:周四fri:周五sat:周六
days String 办公时间适用的日期。 all:每月的每一天1-31:每月指定的日期
office_times
Array<Time_Period> 办公时间段列表。 time_condition_switch Integer 是否启用高级时间条件。 0:禁用。1:启用。
- Time_Period
-
参数 类型 说明 value String 时间段,格式为 HH:MM-HH:MM。
示例
请求示例
GET /openapi/v1.0/outbound_route/search?page=1&page_size=20&sort_by=pos&order_by=asc&search_value=shared&access_token=nIAuSgDUim0uZgrNuha8hfzwbvY41NWR HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
响应示例
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "total_number": 1, "last_pos": 3, "data": [ { "id": 11, "name": "shared-trunk", "dial_pattern": [ "55033X.", "123X." ], "trunk": [ { "id": 27, "name": "test-peer-trunking" } ], "pos": 4 } ] }