Querying API Details
Function
This API is used to query the details of a specified API.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
Request Method |
URI |
---|---|
GET |
/v1.0/apigw/apis/{id} |
The following table lists the parameters in the URI.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
API ID |
Request
N/A
Response
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 was created |
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. |
tag |
String |
Service name tag, which is to be discarded |
tags |
[]String |
API tags |
cors |
Bool |
Indicates whether CORS is supported. |
body_remark |
String |
Description of the API request body, which can be an example request body, media type, or parameter information |
result_normal_sample |
String |
Example response for a successful request |
result_failure_sample |
String |
Example response for a failed request |
response_id |
String |
ID of the gateway response |
backend_api |
Dictionary |
Web backend details |
mock_info |
Dictionary |
Mock backend details |
func_info |
Dictionary |
FunctionGraph backend details |
req_params |
Dictionary |
Request parameter list |
backend_params |
Dictionary |
Backend parameter list |
policy_https |
Dictionary |
Web backend policy list |
policy_mocks |
Dictionary |
Mock backend policy list |
policy_functions |
Dictionary |
FunctionGraph backend policy list |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Web backend ID |
status |
Integer |
Web backend status |
url_domain |
String |
Backend endpoint |
version |
String |
Web backend version |
req_protocol |
String |
Request protocol |
req_method |
String |
Request method |
req_uri |
String |
Access address |
timeout |
Integer |
Timeout duration in milliseconds |
register_time |
Timestamp |
Creation time |
update_time |
Timestamp |
Time when the web backend was last modified |
remark |
String |
Description of the web backend |
vpc_status |
String |
Indicates whether to use a VPC channel. |
vpc_info |
String |
VPC channel information |
authorizer_id |
String |
ID of the backend custom authorizer |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Mock backend ID |
status |
Integer |
Mock backend status |
version |
String |
Mock backend version |
result_content |
String |
Mock response |
register_time |
Timestamp |
Creation time |
update_time |
Timestamp |
Time when the Mock backend was last modified |
remark |
String |
Description of the Mock backend |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Function ID |
status |
Integer |
Function status |
version |
String |
Function version |
function_urn |
String |
Function URN |
invocation_type |
String |
Invocation mode, which can be async or sync |
register_time |
Timestamp |
Creation time |
update_time |
Timestamp |
Time when the function was last updated |
timeout |
Integer |
Timeout duration in milliseconds |
remark |
String |
Description of the function |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Parameter ID |
name |
String |
Parameter name |
type |
String |
Parameter type |
location |
String |
Parameter location |
default_value |
String |
Default value |
sample_value |
String |
Example value |
required |
Integer |
Indicates whether the parameter is mandatory. The value can be:
|
valid_enable |
Integer |
Indicates whether validity check is enabled. |
remark |
String |
Description of the parameter |
enumerations |
String |
Enumerated value |
min_num |
Integer |
Minimum value, which is valid when the parameter type is NUMBER |
max_num |
Integer |
Maximum value, which is valid when the parameter type is NUMBER |
min_size |
Integer |
Minimum length |
max_size |
Integer |
Maximum length |
regular |
String |
Regular verification rule (currently not supported) |
json_schema |
String |
JSON verification rule (currently not supported) |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Parameter ID |
req_param_id |
String |
ID of the request parameter to which the backend parameter is mapped |
name |
String |
Parameter name |
location |
String |
Parameter location |
origin |
String |
Parameter type |
value |
String |
Parameter value |
remark |
String |
Description of the parameter |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Backend policy ID |
name |
String |
Backend name |
url_domain |
String |
Endpoint of the policy backend |
req_protocol |
String |
Request protocol |
req_method |
String |
Request method |
req_uri |
String |
Access address |
timeout |
Integer |
Timeout duration in milliseconds |
vpc_status |
String |
Indicates whether to use a VPC channel. |
vpc_info |
String |
VPC channel information |
effect_mode |
String |
Effective mode of the backend policy |
conditions |
Dictionary |
Policy condition list |
backend_params |
Dictionary |
Backend parameter list |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Backend policy ID |
name |
String |
Backend name |
result_content |
String |
Mock response |
effect_mode |
String |
Effective mode of the backend policy |
conditions |
Dictionary |
Policy condition list |
backend_params |
Dictionary |
Backend parameter list |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Backend policy ID |
name |
String |
Backend name |
version |
String |
Function version |
function_urn |
String |
Function URN |
invocation_type |
String |
Invocation mode, which can be async or sync |
timeout |
Integer |
Timeout duration in milliseconds |
effect_mode |
String |
Effective mode of the backend policy |
conditions |
Dictionary |
Policy condition list |
backend_params |
Dictionary |
Backend parameter list |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Backend policy condition ID |
condition_type |
String |
Condition type |
condition_value |
String |
Condition value |
condition_origin |
String |
Condition source |
req_param_name |
String |
Input parameter name |
req_param_id |
String |
Input parameter ID |
req_param_location |
String |
Input parameter location |
Parameter |
Type |
Description |
---|---|---|
app_code_auth_type |
String |
Indicates whether AppCode authentication is enabled. |
Example response:
{ "name": "test", "type": 1, "version": "V0.0.1", "req_protocol": "HTTPS", "req_method": "GET", "req_uri": "/test/{tenant_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", "result_normal_sample": "hello world!", "id": "81efcfd94b8747a0b21e8c04144a4e8c", "status": 1, "arrange_necessary": 2, "register_time": "2018-08-15T03:41:11.0239936Z", "update_time": "2018-08-15T03:41:11.0239936Z", "group_name": "group0002", "backend_api": { "url_domain": "xxxxxxxxxxx", "req_protocol": "HTTP", "req_method": "GET", "req_uri": "/test", "timeout": 1000, "vpc_status": 2, "id": "3442ffd031814e3a8f133a9f1ea08453", "status": 1, "register_time": "2018-08-15T03:41:11.1019236Z", "update_time": "2018-08-15T03:41:11.1019236Z" }, "req_params": [ { "name": "tenant_id", "type": "STRING", "location": "PATH", "required": 1, "valid_enable": 2, "id": "593c5560e0924e00af08fb458f850ecb" }, { "name": "city", "type": "STRING", "location": "QUERY", "required": 2, "valid_enable": 2, "id": "e0b91bc81ae54f8ea850848d782d6e1e" } ], "backend_params": [ { "name": "tenant_id", "location": "QUERY", "origin": "REQUEST", "value": "tenant_id", "id": "44e03de2351e43a8b18ba9ec1e71d2e9", "req_param_id": "593c5560e0924e00af08fb458f850ecb" }, { "name": "city", "location": "QUERY", "origin": "REQUEST", "value": "city", "id": "b60fbcb5b86f4f5c8705c445b9bd6325", "req_param_id": "e0b91bc81ae54f8ea850848d782d6e1e" } ], "policy_https": [{ "conditions": [{ "id": "44e03de2351e43a8b18ba9ec1e71d2e9", "condition_type": "pattern", "condition_value": "^[0-9]$", "condition_origin": "param", "req_param_name": "project_id", "req_param_id": "b60fbcb5b86f4f5c8705c445b9sda325", "req_param_location": "PATH" }], "backend_params": [{ "name": "project_id", "value": "bbbb", "location": "QUERY", "origin": "REQUEST", "id": "44e03de2351e43a8b18ba9ec1e71d2e8", "req_param_id": "593c5560e0924e00af08fb458f850ecb" }], "effect_mode": "ANY", "id": "44e03de2351e43a8b18ba9ec1e71d2e8", "name": "policy001", "req_method": "GET", "req_protocol": "http", "req_uri": "/test/policy", "timeout": 10000, "url_domain": "xxxxxxxxxxx", "vpc_status": 2 }] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
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