Updated on 2024-05-30 GMT+08:00

Obtaining the App List

Function

This API is used to obtain the basic information about APIG apps. You can obtain only the information about the apps created by yourself.

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

app_name

No

String

App name.

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.

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.

iphertext_enabled

No

Boolean

Whether to display the AppSecret in plaintext.

app_ids

No

Array

App IDs to be displayed in plaintext.

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

apps

Array of ApigAppDetailInfo objects

Basic app information array, which may be an empty array

count

Integer

Number of queried apps

total_count

Integer

Total number of apps

Table 5 ApigAppDetailInfo

Parameter

Type

Description

app_codes

Array of strings

App code list. When app_type is APIC, this parameter is left blank.

app_id

String

App ID

app_key

String

App key

app_name

String

App name

app_remark

String

App description, which is left blank by default. The value contains a maximum of 200 characters.

app_secret

String

App secret key

app_type

String

App type. Enums:

  • APIC: This App is registered with the ROMA Connect gateway.

  • APIG: This App is registered with the shared API gateway.

  • DEDICATE_APIG: This App is registered with the dedicated API gateway.

bounded_api_count

Integer

Number of APIs bound to the app

created_at

Long

Time when an app is created

project_id

String

Project ID

updated_at

Long

App update time

user_id

String

ID of the user who creates the app

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

Example Responses

Status code: 200

OK

{
  "apps" : [ {
    "app_id" : "fb1a9eadd87b48abbd74b8ba1755dffd",
    "app_name" : "app_13e0",
    "app_remark" : "ds",
    "app_key" : "b11ae87581b04b5284aa92b0d4ae332c",
    "app_secret" : "cb5d1b57368b4f129b635332a03bf0e3",
    "user_id" : "04f258c8fb00d42a1f65c00df88cc4dc",
    "project_id" : "04f258c84780d5a52f3bc00dc15aa5e7",
    "app_type" : "APIG",
    "app_codes" : [ "53a7c6de82be4671b93414adf98c1c507d5cef29fbdd48d88a4dddb668b0f0ad", "3b5930537438461b9a3e81e5f21d56b49eadbe1047174574b9d2dde859beec54", "55804013463d4344ac37775ff8f6e9d8343933f8f0be420cb2e87bb5aad4c6a3" ],
    "created_at" : 1683173880900,
    "updated_at" : 1703160524345,
    "bounded_api_count" : 29
  } ],
  "count" : 1,
  "total_count" : 1
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.