Help Center/ ModelArts/ API Reference/ App Authentication Management/ Obtaining the List of APIs Bound to an App
Updated on 2024-05-30 GMT+08:00

Obtaining the List of APIs Bound to an App

Function

This API is used to obtain the list of APIs bound to an app.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

app_id

Yes

String

App ID

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

String

Number of items displayed on one page. The default value is 1000.

offset

No

String

Sequence number of the page from which data is displayed on multiple pages. The default value is 0.

order

No

String

Sorting mode of the returned app list. The value can be asc and desc. The default value is asc.

service_name

No

String

Name of the service to which the API belongs. Fuzzy search is supported.

sort_by

No

String

Attribute by which the returned app list is sorted. The options are app_name, created_at, and updated_at. The default value is app_name.

workspace_id

No

String

Workspace ID.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

No

String

Message body type. text/plain indicates that a temporary preview URL is returned. application/octet-stream indicates that a temporary download URL is returned.

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

apis

Array of AuthTypeApiBasicInfo objects

API authentication information list.

count

Integer

Number of records.

total_count

Integer

Total number of records.

Table 5 AuthTypeApiBasicInfo

Parameter

Type

Description

api_id

String

API ID

api_method

String

Request method, which can be GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, or ANY. ANY is the default value.

api_name

String

API name

api_remark

String

API description. The value contains a maximum of 255 characters.

auth_type

String

API authentication mode. The options are: Enums:

  • NONE: no authentication

  • APP: App authentication

  • IAM: IAM authentication

predict_url

String

Prediction URL

service_id

String

Service ID

service_name

String

Service name

support_app_code

Boolean

Whether to support the App code

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Example Requests

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

Example Responses

Status code: 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
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.