Updated on 2023-04-06 GMT+08:00

Querying Gateway Features

Function

This API is used to query the features of a gateway. If a gateway does not support the features listed in the following table, contact technical support to upgrade the gateway.

The following table lists the supported gateway features.

Feature NameDescriptionConfigurable
ltsReporting of Shubao access logsYes
gateway_responsesCustom gateway responsesNo
ratelimitRequest throttling limit configurationYes
request_body_sizeConfiguration of the maximum request body sizeYes
backend_timeoutMaximum backend timeout configurationYes
app_tokenapp_token authenticationYes
app_api_keyapp_api_key authenticationYes
app_basicapp_basic authenticationYes
app_secretapp_secret authenticationYes
app_jwtapp_jwt authenticationYes
public_keypublic_key backend signaturesYes
backend_token_allowAllowing tenants to transparently transmit tokens to the backendYes
sign_basicBasic signature keysNo
multi_authTwo-factor authenticationNo
backend_client_certificateBackend two-way authenticationYes
ssl_ciphersHTTPS cipher suitesYes
routeCustom routesNo
corsPlug-insNo
real_ip_from_xffUsing the X-Forwarded-For header to specify source IP addresses for access control and request throttlingYes
app_routeIP address accessYes
vpc_name_modifiableLoad balance channel name modificationYes
default_group_host_trustlistAccess to the DEFAULT group from IP addresses that are not inbound access addresses of the current gatewayYes
throttle_strategyRequest throttling algorithm policiesYes
custom_logPrinting custom request headers, query strings, and cookies in logsYes
real_ip_header_getterUsing a custom header to obtain source IP addressesYes
policy_cookie_paramUsing cookies in backend policy conditionsYes
app_quotaClient quotasNo
app_aclRequest throttling policiesNo
set_resp_headersResponse header management plug-insNo
vpc_backupPrimary/Standby VPC channelsNo
sign_aesAES signature keysNo
kafka_logAdding, deleting, modifying, and querying Kafka log push plug-insNo
backend_retry_countBackend retry configurationNo
policy_sys_paramUsing system parameters in backend policy conditionsNo
breakerCircuit breakersNo
content_type_configurableReturning request parameter type (Content-Type) when querying APIsNo
rate_limit_pluginRequest throttling plug-insNo
breakerv2Circuit breakers for degrading services in case of overloadNo
sm_cipher_typeEncrypting local sensitive data with commercial cryptographic algorithmsNo
rate_limit_algorithmRequest throttling algorithm switchoverNo

URI

GET /v2/{project_id}/apigw/instances/{instance_id}/features

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see "Appendix" > "Obtaining a Project ID" in this document.

instance_id

Yes

String

Gateway ID, which can be obtained from the gateway information on the APIG console.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Long

Offset from which the query starts. If the value is less than 0, it is automatically converted to 0.

Default: 0

limit

No

Integer

Number of items displayed on each page. A value less than or equal to 0 will be automatically converted to 20, and a value greater than 500 will be automatically converted to 500.

Minimum: 1

Maximum: 500

Default: 20

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

size

Integer

Length of the returned resource list.

total

Long

Number of resources that match the query conditions.

features

Array of FeatureInfo objects

Feature list.

Table 5 FeatureInfo

Parameter

Type

Description

id

String

Feature ID.

name

String

Feature name.

Minimum: 1

Maximum: 64

enable

Boolean

Indicates whether to enable the feature.

config

String

Parameter configuration.

instance_id

String

Gateway ID.

update_time

String

Feature update time.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

None

Example Responses

Status code: 200

OK

{
  "total" : 1,
  "size" : 1,
  "features" : [ {
    "config" : "on",
    "enable" : true,
    "id" : "db9a9260cd3e4a16a9b5747a65d3ffaa",
    "instance_id" : "eddc4d25480b4cd6b512f270a1b8b341",
    "name" : "app_api_key",
    "update_time" : "2020-08-24T01:17:31.041984Z"
  } ]
}

Status code: 400

Bad Request

{
  "error_code" : "APIG.2012",
  "error_msg" : "Invalid parameter value,parameterName:instance_id. 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:eddc4d25480b4cd6b512f270a1b8b341"
}

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.