查询应用机构列表 - ListAppOrganizations
功能介绍
查询一个应用被授权访问的机构列表
接口约束
null
URI
GET /api/v2/tenant/applications/{application_id}/organizations
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| application_id | 是 | String | 应用id。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| offset | 是 | Integer | 第几页。 |
| limit | 是 | Integer | 每页多少条。 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| Authorization | 是 | String | 认证凭据,值:Bearer {access_token},access_token通过“获取访问凭据”接口获取。 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total | Long | 应用机构总数。 |
| organizations | Array of ApplicationOrg objects | 机构列表。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| org_id | String | 应用机构id。 |
| org_code | String | 应用机构编码。 |
| name | String | 应用机构名。 |
| parent_id | String | 父机构id。 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误编号。 |
| error_msg | String | 错误详情。 |
请求示例
根据应用id分页查询应用中的机构列表中的前100条数据,如不满100条,则返回实际数量的数据。
GET https://{domain_name}/api/v2/tenant/applications/{application_id}/organizations?offset=0&limit=100
Authorization: Bearer 334963fc-1e4a-473b-9096-52a929140... 响应示例
状态码:200
请求成功。
{
"total" : 1,
"organizations" : [ {
"org_id" : "20210623103520050-C5AF-DD1A97...",
"org_code" : "10000",
"name" : "总部",
"parent_id" : null
}, {
"org_id" : "20210619175409400-BFA4-63FA63...",
"org_code" : "10001",
"name" : "开发组",
"parent_id" : "20210623103520050-C5AF-DD1A97..."
} ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 请求成功。 |
| 400 | 参数无效。 |
错误码
请参见错误码。