Querying an API List
Function
This API is used to query an API list to return details and publication information of the APIs. Backend information of the APIs will not be returned.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
Request Method |
URI |
---|---|
GET |
/v1.0/apigw/apis[?page_size, page_no, id, name, group_id, req_protocol, req_method, req_uri, auth_type, env_id, type,status, tags] |
- A combination of different query conditions can be added at the end of the URI by using question marks (?) and ampersands (&).
- Query conditions include: ID, name, group_id, req_protocol, req_method, req_uri, auth_type, env_id, type, status, tags, page_size, and page_no.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
API ID |
name |
No |
String |
API name |
group_id |
No |
String |
ID of the API group to which the API belongs |
req_protocol |
No |
String |
Request protocol |
req_method |
No |
String |
Request method |
req_uri |
No |
String |
Request path |
auth_type |
No |
String |
Security authentication mode |
env_id |
No |
String |
ID of the environment in which the API has been published |
type |
No |
Integer |
API type |
tags |
No |
String |
API tags |
page_size |
No |
Integer |
Number of records displayed on each page. The default value is 20 and the maximum value is 500. When the value of page_size is set to 0, all APIs are returned. |
page_no |
No |
Integer |
Page number. The default value is 1. |
precise_search |
No |
String |
Parameter name (name or req_uri) for exact matching |
Response
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Number of APIs that match the query conditions |
size |
Integer |
Length of the returned API list |
apis |
Dictionary |
API list |
Parameter |
Type |
Description |
---|---|---|
id |
String |
API ID |
name |
String |
API name |
group_id |
String |
ID of the API group to which the API belongs |
group_name |
String |
Name of the API group to which the API belongs |
status |
Integer |
API status |
type |
Integer |
API type |
version |
String |
API version |
req_protocol |
String |
Request protocol |
req_method |
String |
Request method |
req_uri |
String |
Access address |
auth_type |
String |
Security authentication mode |
auth_opt |
Object |
Security authentication mode parameter |
authorizer_id |
String |
ID of the frontend custom authorizer |
match_mode |
String |
Matching mode |
register_time |
Timestamp |
Time when the API is registered |
update_time |
Timestamp |
Time when the API was last modified |
remark |
String |
API description |
bakend_type |
String |
Backend type |
run_env_name |
String |
Name of the environment in which the API has been published |
run_env_id |
String |
ID of the environment in which the API has been published |
publish_id |
String |
ID of the publication record |
arrange_necessary |
Integer |
Indicates whether orchestration is required. |
cors |
Bool |
Indicates whether CORS is supported. |
tag |
String |
Service name tag, which is to be discarded |
tags |
[]String |
API tags |
response_id |
String |
ID of the gateway response |
Parameter |
Type |
Description |
---|---|---|
app_code_auth_type |
String |
Indicates whether AppCode authentication is enabled. |
Example response:
{ "total": 3, "size": 3, "apis": [ { "name": "test", "type": 1, "version": "V0.0.1", "req_protocol": "HTTPS", "req_method": "GET", "req_uri": "/test/{project_id}", "auth_type": "APP", "auth_opt": { "app_code_auth_type": "DISABLE" }, "tags": ["APIG-SN-test", "test"], "cors": false, "match_mode": "NORMAL", "backend_type": "HTTP", "group_id": "f71f69876f90456ca6fd18ed012fdc11", "id": "81efcfd94b8747a0b21e8c04144a4e8c", "status": 1, "arrange_necessary": 2, "register_time": "2018-08-15T03:41:11Z", "update_time": "2018-08-15T03:41:11Z", "group_name": "group0002" }, { "name": "bbbbb", "type": 1, "version": "0.0.1", "req_protocol": "HTTPS", "req_method": "GET", "req_uri": "/test002", "auth_type": "APP", "auth_opt": { "app_code_auth_type": "DISABLE" }, "tags": ["APIG-SN-test", "test"], "cors": false, "match_mode": "NORMAL", "backend_type": "MOCK", "remark": "aaa", "group_id": "70f1b578da9b4dfe889b4c33d1b995c2", "id": "91c26288acea4448be205265d77dae22", "status": 1, "arrange_necessary": 2, "register_time": "2018-07-27T11:54:24Z", "update_time": "2018-07-27T11:54:24Z", "group_name": "test001", "run_env_name": "RELEASE", "run_env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID", "publish_id": "a6e06a00c382436eb524fa2dd343cb6d" }, { "name": "aaa", "type": 1, "version": "0.0.1", "req_protocol": "HTTPS", "req_method": "GET", "req_uri": "/test001", "auth_type": "APP", "auth_opt": { "app_code_auth_type": "DISABLE" }, "tags": ["APIG-SN-test", "test"], "cors": false, "match_mode": "NORMAL", "backend_type": "MOCK", "remark": "aaa", "group_id": "70f1b578da9b4dfe889b4c33d1b995c2", "id": "aebacac6095942b4b2dd2b209bb7b9bc", "status": 1, "arrange_necessary": 2, "register_time": "2018-07-27T11:23:34Z", "update_time": "2018-07-27T11:23:34Z", "group_name": "test001", "run_env_name": "RELEASE", "run_env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID", "publish_id": "1bc8b2b741a04bd4af3ef9d7cd003104" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
500 |
Server Internal Error |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot