更新时间:2025-07-25 GMT+08:00
分享

委托查询

功能介绍

委托查询,查询委托是否创建及委托中的action与配置的是否完全一致。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v2/agency

表1 Query参数

参数

是否必选

参数类型

描述

agency_type

String

委托类型:JOB_TRUST-任务委托、ADMIN_TRUST-系统委托。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

租户token。

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

agency_type

String

委托类型:JOB_TRUST-任务委托、ADMIN_TRUST-系统委托。

agency_name

String

委托名称

authorized

Boolean

授权与否,委托未创建返回false,当委托权限影响实例运行时,返回false,权限足够,返回true

missing_action

Array of strings

缺少的action,页面提示用户具体缺少的权限,

当返回为空说明委托没创建或者不缺少权限,配合authorized字段使用

当返回具体的action列表时,说明委托下缺少对应的权限

状态码:400

表4 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误描述。

common_error_code

String

CBC公共错误码。

solution_msg

String

解决方案描述。

状态码:401

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误描述。

common_error_code

String

CBC公共错误码。

solution_msg

String

解决方案描述。

状态码:403

表6 响应Body参数

参数

参数类型

描述

error

Error object

错误信息。

error_code

String

错误码。

error_msg

String

错误描述。

title

String

标题。

表7 Error

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误描述。

title

String

标题。

message

String

错误信息。

code

String

状态码。

状态码:404

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误描述。

common_error_code

String

CBC公共错误码。

solution_msg

String

解决方案描述。

状态码:408

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误描述。

common_error_code

String

CBC公共错误码。

solution_msg

String

解决方案描述。

状态码:500

表10 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误描述。

common_error_code

String

CBC公共错误码。

solution_msg

String

解决方案描述。

请求示例

/v2/agency?agency_type=JOB_TRUST

响应示例

状态码

状态码

描述

200

委托返回结果

400

{

"error_code": "common.01000001",

"error_msg": "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException"

}

401

{

"error_code": 'APIG.1002',

"error_msg": 'Incorrect token or token resolution failed'

}

403

{

"error": {

"code": "403",

"message": "X-Auth-Token is invalid in the request",

"error_code": null,

"error_msg": null,

"title": "Forbidden"

},

"error_code": "403",

"error_msg": "X-Auth-Token is invalid in the request",

"title": "Forbidden"

}

404

{

"error_code": "common.01000001",

"error_msg": "response status exception, code: 404"

}

408

{

"error_code": "common.00000408",

"error_msg": "timeout exception occurred"

}

500

{

"error_code": "common.00000500",

"error_msg": "internal error"

}

错误码

请参见错误码

相关文档