Querying APIs
Function
This API is used to query APIs to return details and publication information of the APIs. Backend information of the APIs will not be returned.
URI
GET /v1/{project_id}/apic/instances/{instance_id}/apis
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Appendix > Obtaining a Project ID in the ROMA Connect API Reference. |
instance_id |
Yes |
String |
Instance ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Long |
Offset from which the query starts. If the offset is less than 0, the value is automatically converted to 0. Default: 0 |
limit |
No |
Integer |
Number of items displayed on each page. Minimum: 1 Maximum: 500 Default: 20 |
id |
No |
String |
API ID. |
name |
No |
String |
API name. |
group_id |
No |
String |
API group ID. |
req_protocol |
No |
String |
Request protocol. |
req_method |
No |
String |
Request method. |
req_uri |
No |
String |
Request path. |
auth_type |
No |
String |
Authentication type. |
env_id |
No |
String |
ID of the environment in which the API has been published. |
type |
No |
Integer |
API type. |
precise_search |
No |
String |
Parameter name (name or req_uri) for exact matching. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
size |
Integer |
Length of the returned resource list. |
total |
Long |
Number of resources that match the query conditions. |
apis |
Array of ApiInfoPerPage objects |
API list. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
API name. The value can contain 3 to 255 characters, including letters, digits, hyphens (-), underscores (_), periods (.), slashes (/), parentheses, and colons (:). The value must start with a letter or digit. Minimum: 3 Maximum: 255 |
type |
Integer |
API type.
|
version |
String |
API version. Maximum: 16 |
req_protocol |
String |
API request protocol.
Default: HTTPS |
req_method |
String |
API request method. |
req_uri |
String |
Request URI. The value can contain request parameters identified by braces ({}), for example, /getUserInfo/{userId}. Special characters such as * / / %- _ . are supported. The total length cannot exceed 512 characters and must meet the URI specifications. /apic/health_check indicates the health check path preset for service integration. When req_method is set to GET, req_uri cannot be set to /apic/health_check. The value must comply with the URI specifications. |
auth_type |
String |
API authentication mode.
|
auth_opt |
AuthOpt object |
Security authentication parameter. |
cors |
Boolean |
Whether CORS is supported.
Default: false |
match_mode |
String |
Match mode of an API.
|
backend_type |
String |
Backend type.
|
remark |
String |
Description of the API, which cannot contain < and >. Minimum: 0 Maximum: 1000 |
group_id |
String |
ID of the API group to which the API belongs. Minimum: 1 Maximum: 65 |
body_remark |
String |
API request body, which can be an example request body, media type, or parameters. Maximum: 20480 |
result_normal_sample |
String |
Example response for a successful request. Maximum: 20480 |
result_failure_sample |
String |
Example response for a failed request. Maximum: 20480 |
authorizer_id |
String |
ID of the frontend custom authorizer. Minimum: 1 Maximum: 65 |
tags |
Array of strings |
Tags. The value can contain letters, digits, and special characters (-*#%.:_) and must start with a letter. You can enter multiple tags and separate them with commas (,). By default, 10 tags are supported. To increase the quota, contact technical support to modify the API_TAG_NUM_LIMIT configuration. Minimum: 1 Maximum: 128 |
response_id |
String |
Group response ID. This parameter is currently not supported. Minimum: 1 Maximum: 65 |
roma_app_id |
String |
ID of the integration application to which an API belongs. This parameter is mandatory when the API group is a global group or when an API is bound to a user-defined domain name. Minimum: 1 Maximum: 65 |
domain_name |
String |
User-defined domain name bound to the API. If a user-defined domain name is used, the roma_app_id field is mandatory. Maximum: 255 |
tag |
String |
Tag. This field will be deprecated. You can use the tags field instead. Maximum: 255 |
content_type |
String |
Request content type: application/json application/xml multipart/form-date text/plain |
id |
String |
API ID. |
status |
Integer |
API status:
|
arrange_necessary |
Integer |
Whether to enable orchestration. Options: 1 (enable) and 2 (disable) |
register_time |
String |
Time when the API is registered. |
update_time |
String |
Time when the API was last modified. |
group_name |
String |
Name of the API group to which the API belongs. |
group_version |
String |
Version of the API group to which the API belongs. |
run_env_name |
String |
Name of the environment in which the API has been published. Separate multiple environment names with vertical bars (|). |
run_env_id |
String |
ID of the environment in which the API has been published. Separate multiple environment IDs with vertical bars (|). |
publish_id |
String |
Publication record ID. Separate multiple publication record IDs with vertical bars (|). |
publish_time |
String |
Publication time. Separate the time of multiple publication records with vertical bars (|). |
roma_app_name |
String |
Name of the integration application to which the API belongs. |
ld_api_id |
String |
ID of the corresponding custom backend API. |
backend_api |
BackendApi object |
Backend information. |
api_group_info |
ApiGroupCommonInfo object |
API group information. |
req_params |
Array of ReqParam objects |
Request parameters. |
Parameter |
Type |
Description |
---|---|---|
app_code_auth_type |
String |
Indicates whether AppCode authentication is enabled. This parameter is valid only if auth_type is set to App. The default value is DISABLE.
Default: DISABLE |
Parameter |
Type |
Description |
---|---|---|
authorizer_id |
String |
Backend custom authorizer ID. |
url_domain |
String |
Address of the backend service. The value consists of the host (IP address or domain name) and port number. The total length cannot exceed 255 characters. The format is Host name:Port number (for example, apig.example.com:7443). If the port number is not specified, the default HTTPS port number is 443, and the default HTTP port number is 80. Environment variables are supported. If environment variables are used, each variable name is a string of 3 to 32 characters. The string consists of letters, digits, underscores (_), and hyphens (-), and must start with an English letter. |
req_protocol |
String |
Request protocol. |
remark |
String |
Description. Maximum: 255 |
req_method |
String |
Request method. |
version |
String |
Web backend version, which can contain a maximum of 16 characters. |
req_uri |
String |
Request URI. The value can contain request parameters identified by braces ({}), for example, /getUserInfo/{userId}. Special characters such as * / / %- _ . are supported. The total length cannot exceed 512 characters and must meet the URI specifications. Environment variables are supported. If environment variables are used, each variable name is a string of 3 to 32 characters. The string consists of letters, digits, hyphens (-), and underscores (_) and must start with an English letter.
NOTE:
The value must comply with the URI specifications. |
timeout |
Integer |
Timeout allowed for APIC to request the backend service. You can set the maximum timeout using the backend_timeout configuration item. The maximum value is 600,000. Unit: ms Minimum: 1 |
enable_client_ssl |
Boolean |
Whether to enable two-way authentication. |
retry_count |
String |
Number of retry times for the APIC to request the backend service. The default value is -1. The value ranges from -1 to 10. Default: -1 |
id |
String |
ID. |
status |
Integer |
Backend status:
|
register_time |
String |
Registration time. |
update_time |
String |
Modification time. |
vpc_channel_info |
VpcInfo object |
VPC channel details. This parameter is required if vpc_channel_status is set to 1. |
vpc_channel_status |
Integer |
Whether to use a VPC channel:
|
Parameter |
Type |
Description |
---|---|---|
ecs_id |
String |
Cloud server ID. |
ecs_name |
String |
Cloud server name. |
cascade_flag |
Boolean |
Indicates whether to use the cascading mode. This parameter is currently not supported. |
vpc_channel_proxy_host |
String |
Proxy host. |
vpc_channel_id |
String |
VPC channel ID. Maximum: 64 |
vpc_channel_port |
Integer |
VPC channel port. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
No. |
name |
String |
API group name. |
status |
Integer |
Status.
|
sl_domain |
String |
Subdomain name that the system automatically allocates to the API group. |
register_time |
String |
Creation time. |
update_time |
String |
Last modification time. |
on_sell_status |
Integer |
Indicates whether the API group has been listed on the marketplace. The value can be:
ROMA Connect is not connected to the marketplace. The default value 2 is returned. |
url_domains |
Array of UrlDomain objects |
List of independent domain names bound to the API group. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Domain ID. |
domain |
String |
Domain name. |
cname_status |
Integer |
CNAME resolution status of the domain name.
|
ssl_id |
String |
SSL certificate ID. |
ssl_name |
String |
SSL certificate name. |
min_ssl_version |
String |
Minimum SSL version. TLS 1.1 and TLS 1.2 are supported. Default: TLSv1.1 |
verified_client_certificate_enabled |
Boolean |
Whether to enable client certificate verification. This parameter is available only when a certificate is bound. It is enabled by default if trusted_root_ca exists, and disabled if trusted_root_ca does not exist. Default: false |
is_has_trusted_root_ca |
Boolean |
Whether a trusted root certificate (CA) exists. The value is true if trusted_root_ca exists in the bound certificate. Default: false |
ssl_infos |
Array of SslInfo objects |
SSL certificate list. To be supported |
Parameter |
Type |
Description |
---|---|---|
ssl_id |
String |
SSL certificate ID. |
ssl_name |
String |
SSL certificate name. |
algorithm_type |
String |
Certificate algorithm type. Options:
To be supported |
type |
String |
Certificate scope. Options:
Default: global |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Parameter name. The value can contain letters, digits, hyphens (-), underscores (_), and periods (.) and must start with a letter. Minimum: 1 Maximum: 32 |
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 of this parameter is 1 if Location is set to PATH, and 2 if Location is set to another value. |
valid_enable |
Integer |
Indicates whether validity check is enabled.
Default: 2 |
remark |
String |
Description. Maximum: 255 |
enumerations |
String |
Enumerated value. |
min_num |
Integer |
Minimum value. This parameter is valid when type is set to NUMBER. |
max_num |
Integer |
Maximum value. This parameter is valid when type is set to NUMBER. |
min_size |
Integer |
Minimum length. This parameter is valid when type is set to STRING. |
max_size |
Integer |
Maximum length. This parameter is valid when type is set to STRING. |
regular |
String |
Regular expression validation rule. This parameter is currently not supported. |
json_schema |
String |
JSON validation rule. This parameter is currently not supported. |
pass_through |
Integer |
Indicates whether to transparently transmit the parameter.
|
id |
String |
Parameter ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
None
Example Responses
Status code: 200
OK
{ "total" : 3, "size" : 3, "apis" : [ { "arrange_necessary" : 2, "id" : "5f918d104dc84480a75166ba99efff21", "tags" : [ "webApi" ], "backend_type" : "HTTP", "auth_type" : "AUTHORIZER", "auth_opt" : { "app_code_auth_type" : "DISABLE" }, "authorizer_id" : "8d0443832a194eaa84244e0c1c1912ac", "cors" : false, "status" : 1, "group_name" : "api_group_001", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_version" : "V1", "match_mode" : "NORMAL", "name" : "Api_http", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/http", "type" : 1, "version" : "V0.0.1", "register_time" : "2020-07-31T12:42:51Z", "update_time" : "2020-08-02T16:32:47.046289Z", "remark" : "web backend API" }, { "id" : "3a955b791bd24b1c9cd94c745f8d1aad", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_name" : "api_group_001", "group_version" : "V1", "match_mode" : "SWA", "name" : "Api_mock", "auth_type" : "IAM", "auth_opt" : { "auth_code_auth_type" : "DISABLE" }, "backend_type" : "MOCK", "cors" : false, "req_protocol" : "HTTPS", "req_uri" : "/test/mock", "remark" : "mock api", "type" : 1, "version" : "V0.0.1", "req_method" : "GET", "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "tags" : [ "mockApi" ], "register_time" : "2020-08-02T15:56:52Z", "update_time" : "2020-08-02T15:56:52Z", "status" : 1 }, { "id" : "abd9c4b2ff974888b0ba79be7e6b2763", "arrange_necessary" : 2, "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_name" : "api_group_001", "group_version" : "V1", "match_mode" : "NORMAL", "name" : "Api_function", "auth_type" : "APP", "auth_opt" : { "auth_code_auth_type" : "DISABLE" }, "backend_type" : "FUNCTION", "cors" : false, "req_protocol" : "HTTPS", "req_uri" : "/test/function", "remark" : "function API", "type" : 1, "version" : "V0.0.1", "status" : 1, "req_method" : "GET", "tags" : [ "functionApi" ], "register_time" : "2020-08-02T15:36:19Z", "update_time" : "2020-08-02T15:47:53.499266Z" } ] }
Status code: 400
Bad Request
{ "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation" }
Status code: 401
Unauthorized
{ "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" }
Status code: 403
Forbidden
{ "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" }
Status code: 404
Not Found
{ "error_code" : "APIG.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec" }
Status code: 500
Internal Server Error
{ "error_code" : "APIG.9999", "error_msg" : "System error" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
See Error Codes.
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