查询自定义认证列表
功能介绍
查询自定义认证列表
URI
HTTP/HTTPS请求方法以及URI如下表所示。
| 请求方法 | URI |
|---|---|
| GET | /v1/{project_id}/apigw/instances/{instance_id}/authorizers[?page_size, page_no, id, name, type] |
- 可以在URI后面用‘?’和‘&’添加不同的查询条件组合。
- 查询条件可为以下字段以及对应的值:id、name、type、page_size、page_no
URI中的参数说明如下表所示。
| 名称 | 是否必选 | 类型 | 说明 |
|---|---|---|---|
| project_id | 是 | String | 项目ID。可从控制台“我的凭证”中获取region下项目ID,管理员权限可查询。 |
| instance_id | 是 | String | 实例ID,可从API网关控制台的专享版实例信息中获取。 |
| id | 否 | String | 编号 |
| name | 否 | String | 名称 |
| type | 否 | String | 类型 |
| page_size | 否 | Integer | 每页显示的条数,默认值:20 |
| page_no | 否 | Integer | 页码,默认值:1 |
请求消息
无
响应消息
| 名称 | 类型 | 说明 |
|---|---|---|
| total | Integer | 满足条件的自定义认证总数 |
| size | Integer | 本次返回的列表长度 |
| authorizer_list | Array | 自定义认证列表 |
| 名称 | 类型 | 说明 |
|---|---|---|
| id | String | 编号 |
| name | String | 自定义认证的名称 |
| type | String | 自定义认证类型:
|
| authorizer_type | String | 只能为:FUNC |
| authorizer_uri | String | 函数urn |
| identities | Array | 认证来源 |
| ttl | Integer | 缓存时间 |
| user_data | String | 用户数据 |
| create_time | Time | 创建时间 |
| 名称 | 类型 | 说明 |
|---|---|---|
| name | String | 参数名称 |
| location | String | 参数位置:
|
响应消息样例:
{
"total":1,
"size":1,
"authorizer_list":[
{
"name":"Authorizer_9dlh",
"type":"FRONTEND",
"authorizer_type":"FUNC",
"authorizer_uri":"urn:fss:regionexample:dbb5762c88f045c6a1427a952bcae284:function:default:test111",
"identities":[
{
"name":"Authorization",
"location":"HEADER",
}
],
"ttl":10,
"user_data":"aaaa",
"id":"7345e3fe4047491ebd8ecb0acd665a4c",
"create_time":"2020-01-19T11:48:56Z"
}
]
} 状态码
| 状态码 | 说明 |
|---|---|
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 500 | Server Internal Error |