文档首页> AI开发平台ModelArts> API参考> APP认证管理> 获取用户绑定APP的api列表
更新时间:2024-05-30 GMT+08:00
分享

获取用户绑定APP的api列表

功能介绍

获取用户绑定app的API列表。

调试

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

URI

GET /v1/{project_id}/app-auth/apps/{app_id}/auth-apis

表1 路径参数

参数

是否必选

参数类型

描述

app_id

String

APP编号。

project_id

String

用户项目ID。获取方法请参见获取项目ID和名称

表2 Query参数

参数

是否必选

参数类型

描述

limit

String

分页展示时,一页展示多少项。默认为1000。

offset

String

分页展示时,从第几页开始。默认为0。

order

String

返回的APP列表排序方式,可选值包括asc、desc。默认为asc。

service_name

String

API所属服务名称,支持模糊查找。

sort_by

String

返回的APP列表按何属性排序,可选值包括app_name、created_at、updated_at。默认为name。

workspace_id

String

工作空间id。

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

消息体的类型。设置为text/plain,返回临时预览链接。设置为application/octet-stream,返回临时下载链接。

X-Auth-Token

String

用户token。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

apis

Array of AuthTypeApiBasicInfo objects

API认证信息列表。

count

Integer

查询数据个数。

total_count

Integer

数据总量。

表5 AuthTypeApiBasicInfo

参数

参数类型

描述

api_id

String

API编号。

api_method

String

请求方式包含GET、POST、PUT、DELETE、HEAD、PATCH、OPTIONS、ANY,固定返回ANY。

api_name

String

API名称。

api_remark

String

API描述。字符长度不超过255。

auth_type

String

API的认证方式。枚举值如下:

  • NONE:无认证

  • APP:APP认证

  • IAM:IAM认证

predict_url

String

预测地址。

service_id

String

服务编号。

service_name

String

服务名称。

support_app_code

Boolean

是否支持APP CODE。

状态码: 401

表6 响应Body参数

参数

参数类型

描述

error_code

String

ModelArts错误码。

error_msg

String

具体错误信息。

状态码: 403

表7 响应Body参数

参数

参数类型

描述

error_code

String

ModelArts错误码。

error_msg

String

具体错误信息。

状态码: 404

表8 响应Body参数

参数

参数类型

描述

error_code

String

ModelArts错误码。

error_msg

String

具体错误信息。

请求示例

GET https://{endpoint}/v1/{project_id}/app-auth/apps/{app_id}/auth-apis

响应示例

状态码: 200

OK

{
  "apis" : [ {
    "api_id" : "7e0d272df0e94297b7d4046bada3f158",
    "api_name" : "infer_ae20fc9fb37c48c28ebc3f3a638c9f48",
    "api_method" : "ANY",
    "predict_url" : "https://b86b2d069324491fbd66940e4533b45c.apig.xxxxxx.com/v1/infers/ae20fc9f-b37c-48c2-8ebc-3f3a638c9f48",
    "support_app_code" : true,
    "service_id" : "ae20fc9f-b37c-48c2-8ebc-3f3a638c9f48",
    "service_name" : "service-3c02"
  } ],
  "count" : 1
}

状态码

状态码

描述

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

错误码

请参见错误码

分享:

    相关文档

    相关产品