Updated on 2022-08-15 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 Name Description Configurable
lts Reporting of Shubao access logs Yes
gateway_responses Custom gateway responses No
ratelimit Request throttling limit configuration Yes
request_body_size Configuration of the maximum request body size Yes
backend_timeout Maximum backend timeout configuration Yes
app_token app_token authentication Yes
app_api_key app_api_key authentication Yes
app_basic app_basic authentication Yes
app_secret app_secret authentication Yes
app_jwt app_jwt authentication Yes
public_key public_key backend signatures Yes
backend_token_allow tenants to transparently transmit tokens to the backend Yes
sign_basic Basic signature keys No
multi_auth Multi-factor authentication No
backend_client_certificate Backend two-way authentication Yes
ssl_ciphers HTTPS cipher suites Yes
route Custom routes No
cors Plug-ins No
real_ip_from_xff Indicates whether to use the X-Forwarded-For header to identify the source IP address during access control and request throttling. Yes

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.

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 records displayed on each page.

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.