API7 Cloud OpenAPI Specification (0.11.0)
Download OpenAPI specification:Download
The OpenAPI specification for API7 Cloud APIs. All APIs are built around Rest. They accept JSON-encoded request body (if necessary) and return JSON-encoded response. The actual API response payload is decorated with some metadata fields:
{
"status": {
"code": <ERROR CODE>,
"message": "<ERROR MESSAGE>"
},
"error": "ERROR DETAILS",
"payload": <SPECIFIC API RESPONSE>
}
The status
and error
fields indicate the error code and error message for this API call.
payload
field contains the specific API response and should be decoded according to the given
schema.
Create Organization
Authorizations:
Request Body schema: application/json
name required | string [ 1 .. 32 ] characters \S+ |
Responses
Request samples
- Payload
{- "name": "string"
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "name": "string",
- "owner_id": "string",
- "plan_expire_time": "2019-08-24T14:15:22Z",
- "plan_id": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Create a new subscription
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
Request Body schema: application/json
plan required | string non-empty |
Responses
Request samples
- Payload
{- "plan": "string"
}
Response samples
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Initialize Organization
Authorizations:
Request Body schema: application/json
name required | string [ 1 .. 32 ] characters \S+ |
Responses
Request samples
- Payload
{- "name": "string"
}
Response samples
- 200
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
List Control Planes
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
query Parameters
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "created_at": "2019-08-24T14:15:22Z",
- "domain": "example.com",
- "id": "string",
- "name": "string",
- "org_id": "string",
- "region_id": "string",
- "status": 1,
- "updated_at": "2019-08-24T14:15:22Z",
- "org_name": "string"
}
]
}
}
Create Control Plane
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
Request Body schema: application/json
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "created_at": "2019-08-24T14:15:22Z",
- "domain": "example.com",
- "id": "string",
- "name": "string",
- "org_id": "string",
- "region_id": "string",
- "status": 1,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Get Control Plane Details
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "created_at": "2019-08-24T14:15:22Z",
- "domain": "example.com",
- "id": "string",
- "name": "string",
- "org_id": "string",
- "region_id": "string",
- "status": 1,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Update Control Plane
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Request Body schema: application/json
custom_server_header | string CustomServerHeader is the |
plugins | Array of strings Plugins is the enabled plugin list that defined in apisix |
object SSLConfig is config for apisix ssl module |
Responses
Request samples
- Payload
{- "custom_server_header": "string",
- "plugins": [
- "string"
], - "ssl": {
- "key_encrypt_salt": "string"
}
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
List Applications
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
query Parameters
order_by | string Enum: "created_at" "updated_at" |
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
search | string search is used to filter the result |
labels | Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used to filter the result |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "canary_release_id": [
- "string"
], - "canary_upstream_version_list": [
- "string"
]
}
]
}
}
Create Application
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Request Body schema: application/json
description | string <= 256 characters |
hosts required | Array of strings non-empty unique |
name required | string [ 1 .. 64 ] characters |
path_prefix required | string [ 1 .. 4096 ] characters ^/ The listening path prefix for this application |
object Policies contains a collect of polices like CORS. | |
protocol | string Enum: "HTTP" "HTTPS" The API Protocol definition |
protocols | Array of strings [ 1 .. 2 ] items unique Items Enum: "HTTP" "HTTPS" |
required | Array of objects [ 1 .. 10 ] items unique [ items ] Upstream settings for the Application |
default_upstream_version | string [ 0 .. 64 ] characters Default: "default" |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "canary_release_id": [
- "string"
], - "canary_upstream_version_list": [
- "string"
]
}
}
Get Application Details
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "canary_release_id": [
- "string"
], - "canary_upstream_version_list": [
- "string"
]
}
}
Update Application
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
Request Body schema: application/json
description | string <= 256 characters |
hosts required | Array of strings non-empty unique |
name required | string [ 1 .. 64 ] characters |
path_prefix required | string [ 1 .. 4096 ] characters ^/ The listening path prefix for this application |
object Policies contains a collect of polices like CORS. | |
protocol | string Enum: "HTTP" "HTTPS" The API Protocol definition |
protocols | Array of strings [ 1 .. 2 ] items unique Items Enum: "HTTP" "HTTPS" |
required | Array of objects [ 1 .. 10 ] items unique [ items ] Upstream settings for the Application |
default_upstream_version | string [ 0 .. 64 ] characters Default: "default" |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "canary_release_id": [
- "string"
], - "canary_upstream_version_list": [
- "string"
]
}
}
Patch Application
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
Request Body schema: application/json
description | string <= 256 characters |
hosts | Array of strings non-empty unique |
name | string [ 1 .. 64 ] characters |
path_prefix | string [ 1 .. 4096 ] characters ^/ The listening path prefix for this application |
object Policies contains a collect of polices like CORS. | |
protocol | string Enum: "HTTP" "HTTPS" The API Protocol definition |
protocols | Array of strings [ 1 .. 2 ] items unique Items Enum: "HTTP" "HTTPS" |
Array of objects [ 1 .. 10 ] items unique [ items ] Upstream settings for the Application | |
default_upstream_version | string [ 0 .. 64 ] characters Default: "default" |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "description": "string",
- "hosts": [
- "string"
], - "name": "string",
- "path_prefix": "string",
- "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "protocol": "HTTP",
- "protocols": [
- "HTTP"
], - "upstreams": [
- {
- "upstream": {
- "scheme": "http",
- "lb_type": "roundrobin",
- "targets": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535
}
], - "retries": 65535,
- "timeout": {
- "connect": 0,
- "send": 0,
- "read": 0
}
}, - "version": "string",
- "client_cert_id": "string"
}
], - "default_upstream_version": "default",
- "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "canary_release_id": [
- "string"
], - "canary_upstream_version_list": [
- "string"
]
}
}
Delete Application
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Create Application
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Request Body schema: application/json
openapi required | string |
Responses
Request samples
- Payload
{- "openapi": "string"
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
List APIs
Authorizations:
path Parameters
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
query Parameters
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
search | string search is used to filter the result |
labels | Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used to filter the result |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "active": 0,
- "description": "string",
- "methods": [
- "GET"
], - "name": "string",
- "paths": [
- {
- "path": "string",
- "path_type": "Exact"
}
], - "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "strip_path_prefix": true,
- "labels": [
- "string"
], - "type": "Rest",
- "app_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
Create API
Authorizations:
path Parameters
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
Request Body schema: application/json
active | integer <int64> Enum: 0 1 Active is the status of the API 0 stands for active 1 stands for inactive |
description | string <= 256 characters |
Array of strings or Array of strings Allowed HTTP methods to access this API, if absent, all HTTP methods are allowed | |
name required | string [ 1 .. 64 ] characters |
required | Array of objects [ 1 .. 64 ] items [ items ] Which URI paths can be matched to this API |
object Policies contains a collect of polices like CORS. | |
strip_path_prefix | boolean Whether to strip the path prefix (defined in the Application) |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
type | string Default: "Rest" Enum: "Rest" "WebSocket" Type is the type of the API Rest means this is a Rest API. WebSocket means this is a WebSocket API. |
Responses
Request samples
- Payload
{- "active": 0,
- "description": "string",
- "methods": [
- "GET"
], - "name": "string",
- "paths": [
- {
- "path": "string",
- "path_type": "Exact"
}
], - "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "strip_path_prefix": true,
- "labels": [
- "string"
], - "type": "Rest"
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Get API Details
Authorizations:
path Parameters
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
api_id required | string^[1-9][0-9]*$ APIID is the API id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "active": 0,
- "description": "string",
- "methods": [
- "GET"
], - "name": "string",
- "paths": [
- {
- "path": "string",
- "path_type": "Exact"
}
], - "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "strip_path_prefix": true,
- "labels": [
- "string"
], - "type": "Rest",
- "app_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Update API
Authorizations:
path Parameters
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
api_id required | string^[1-9][0-9]*$ APIID is the API id |
Request Body schema: application/json
active | integer <int64> Enum: 0 1 Active is the status of the API 0 stands for active 1 stands for inactive |
description | string <= 256 characters |
Array of strings or Array of strings Allowed HTTP methods to access this API, if absent, all HTTP methods are allowed | |
name required | string [ 1 .. 64 ] characters |
required | Array of objects [ 1 .. 64 ] items [ items ] Which URI paths can be matched to this API |
object Policies contains a collect of polices like CORS. | |
strip_path_prefix | boolean Whether to strip the path prefix (defined in the Application) |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
type | string Default: "Rest" Enum: "Rest" "WebSocket" Type is the type of the API Rest means this is a Rest API. WebSocket means this is a WebSocket API. |
Responses
Request samples
- Payload
{- "active": 0,
- "description": "string",
- "methods": [
- "GET"
], - "name": "string",
- "paths": [
- {
- "path": "string",
- "path_type": "Exact"
}
], - "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "strip_path_prefix": true,
- "labels": [
- "string"
], - "type": "Rest"
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "active": 0,
- "description": "string",
- "methods": [
- "GET"
], - "name": "string",
- "paths": [
- {
- "path": "string",
- "path_type": "Exact"
}
], - "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "strip_path_prefix": true,
- "labels": [
- "string"
], - "type": "Rest",
- "app_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Patch API
Authorizations:
path Parameters
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
api_id required | string^[1-9][0-9]*$ APIID is the API id |
Request Body schema: application/json
active | integer <int64> Enum: 0 1 Active is the status of the API 0 stands for active 1 stands for inactive |
description | string <= 256 characters |
Array of strings or Array of strings Allowed HTTP methods to access this API, if absent, all HTTP methods are allowed | |
name | string [ 1 .. 64 ] characters |
Array of objects [ 1 .. 64 ] items [ items ] Which URI paths can be matched to this API | |
object Policies contains a collect of polices like CORS. | |
strip_path_prefix | boolean Whether to strip the path prefix (defined in the Application) |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
type | string Default: "Rest" Enum: "Rest" "WebSocket" Type is the type of the API Rest means this is a Rest API. WebSocket means this is a WebSocket API. |
Responses
Request samples
- Payload
{- "active": 0,
- "description": "string",
- "methods": [
- "GET"
], - "name": "string",
- "paths": [
- {
- "path": "string",
- "path_type": "Exact"
}
], - "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "strip_path_prefix": true,
- "labels": [
- "string"
], - "type": "Rest"
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "active": 0,
- "description": "string",
- "methods": [
- "GET"
], - "name": "string",
- "paths": [
- {
- "path": "string",
- "path_type": "Exact"
}
], - "policies": {
- "basic_auth": {
- "strip_credentials": true,
- "disable": false
}, - "cors": {
- "allow_methods": [
- "*"
], - "allow_origins": [
- "*"
], - "allow_headers": [
- "*"
], - "allow_credential": false,
- "max_age": 5,
- "expose_headers": [
- "*"
], - "disable": false
}, - "hmac_auth": {
- "strip_credentials": true,
- "disable": false
}, - "key_auth": {
- "header": "apikey",
- "query": "apikey",
- "strip_credentials": true,
- "disable": false
}, - "rate_limiting": {
- "count": 300,
- "period": 10,
- "reject_code": 429,
- "reject_error_message": "Too Many Requests",
- "disable": false
}, - "openid_connect_auth": {
- "client_id": "string",
- "client_secret": "string",
- "discovery": "string",
- "bearer_only": false,
- "scope": "openid",
- "auth_method": "client_secret_basic",
- "set_userinfo_header": true,
- "redirect_uri": "string",
- "logout_path": "/logout",
- "post_logout_path": "string",
- "disable": false
}, - "acl": {
- "run_mode": "allow",
- "consumer_list": [
- "string"
], - "label_list": [
- "string"
], - "reject_code": 403,
- "reject_msg": "The consumer is forbidden.",
- "disable": false
}, - "fault_injection": {
- "percentage": 50,
- "run_mode": "abort",
- "inject_code": 500,
- "inject_body": "Injected Error Message",
- "disable": false
}, - "request_rewrite": {
- "uri": {
- "mode": "regex_replace",
- "regex_pattern": "string",
- "new_uri": "string"
}, - "method": "GET",
- "headers": [
- {
- "operation": "add_replace",
- "key": "string",
- "value": "string"
}
], - "disable": false
}, - "logging": {
- "log_collection_ids": [
- "string"
]
}, - "ip_restriction": {
- "run_mode": "allow",
- "ip_list": [
- "192.168.0.1"
], - "reject_msg": "Your IP address is not allowed",
- "disable": false
}, - "jwt_auth": {
- "position": "header",
- "token_name": "jwt",
- "strip_credentials": true,
- "disable": false
}
}, - "strip_path_prefix": true,
- "labels": [
- "string"
], - "type": "Rest",
- "app_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
List Consumers
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
query Parameters
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
search | string search is used to filter the result |
labels | Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used to filter the result |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "description": "jack is the most important API consumer.",
- "name": "jack",
- "credentials": {
- "basic_auth": {
- "password": "string",
- "username": "string"
}, - "hmac_auth": {
- "access_key": "string",
- "algorithm": "hmac-sha1",
- "clock_skew": 0,
- "encode_uri_params": true,
- "max_req_body": 524288,
- "secret_key": "string",
- "signed_headers": [
- "string"
], - "validate_request_body": false
}, - "key_auth": {
- "key": "d41d8cd98f00b204e9800998ecf8427e"
}, - "jwt_auth": {
- "key": "user-key",
- "secret": "my-secret-key",
- "base_64_secret": true,
- "algorithm": "HS256"
}
}, - "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
Create Consumer
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Request Body schema: application/json
description | string <= 256 characters Description for this consumer. |
name required | string [ 1 .. 100 ] characters ^[a-zA-Z0-9_]+$ Name of the consumer, should be unique among all applications in the same control plane. |
object or null ConsumerCredentials contains a collect of policies can be configured on the consumer. | |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "description": "jack is the most important API consumer.",
- "name": "jack",
- "credentials": {
- "basic_auth": {
- "password": "string",
- "username": "string"
}, - "hmac_auth": {
- "access_key": "string",
- "algorithm": "hmac-sha1",
- "clock_skew": 0,
- "encode_uri_params": true,
- "max_req_body": 524288,
- "secret_key": "string",
- "signed_headers": [
- "string"
], - "validate_request_body": false
}, - "key_auth": {
- "key": "d41d8cd98f00b204e9800998ecf8427e"
}, - "jwt_auth": {
- "key": "user-key",
- "secret": "my-secret-key",
- "base_64_secret": true,
- "algorithm": "HS256"
}
}, - "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "description": "jack is the most important API consumer.",
- "name": "jack",
- "credentials": {
- "basic_auth": {
- "password": "string",
- "username": "string"
}, - "hmac_auth": {
- "access_key": "string",
- "algorithm": "hmac-sha1",
- "clock_skew": 0,
- "encode_uri_params": true,
- "max_req_body": 524288,
- "secret_key": "string",
- "signed_headers": [
- "string"
], - "validate_request_body": false
}, - "key_auth": {
- "key": "d41d8cd98f00b204e9800998ecf8427e"
}, - "jwt_auth": {
- "key": "user-key",
- "secret": "my-secret-key",
- "base_64_secret": true,
- "algorithm": "HS256"
}
}, - "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Get Consumer Details
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
consumer_id required | string non-empty ^[1-9][0-9]*$ ConsumerId is the consumer id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "description": "jack is the most important API consumer.",
- "name": "jack",
- "credentials": {
- "basic_auth": {
- "password": "string",
- "username": "string"
}, - "hmac_auth": {
- "access_key": "string",
- "algorithm": "hmac-sha1",
- "clock_skew": 0,
- "encode_uri_params": true,
- "max_req_body": 524288,
- "secret_key": "string",
- "signed_headers": [
- "string"
], - "validate_request_body": false
}, - "key_auth": {
- "key": "d41d8cd98f00b204e9800998ecf8427e"
}, - "jwt_auth": {
- "key": "user-key",
- "secret": "my-secret-key",
- "base_64_secret": true,
- "algorithm": "HS256"
}
}, - "labels": [
- "string"
], - "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Update Consumer
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
consumer_id required | string non-empty ^[1-9][0-9]*$ ConsumerId is the consumer id |
Request Body schema: application/json
description | string <= 256 characters Description for this consumer. |
name required | string [ 1 .. 100 ] characters ^[a-zA-Z0-9_]+$ Name of the consumer, should be unique among all applications in the same control plane. |
object or null ConsumerCredentials contains a collect of policies can be configured on the consumer. | |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "description": "jack is the most important API consumer.",
- "name": "jack",
- "credentials": {
- "basic_auth": {
- "password": "string",
- "username": "string"
}, - "hmac_auth": {
- "access_key": "string",
- "algorithm": "hmac-sha1",
- "clock_skew": 0,
- "encode_uri_params": true,
- "max_req_body": 524288,
- "secret_key": "string",
- "signed_headers": [
- "string"
], - "validate_request_body": false
}, - "key_auth": {
- "key": "d41d8cd98f00b204e9800998ecf8427e"
}, - "jwt_auth": {
- "key": "user-key",
- "secret": "my-secret-key",
- "base_64_secret": true,
- "algorithm": "HS256"
}
}, - "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Patch Consumer
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
consumer_id required | string non-empty ^[1-9][0-9]*$ ConsumerId is the consumer id |
Request Body schema: application/json
description | string <= 256 characters Description for this consumer. |
name | string [ 1 .. 100 ] characters ^[a-zA-Z0-9_]+$ Name of the consumer, should be unique among all applications in the same control plane. |
object or null ConsumerCredentials contains a collect of policies can be configured on the consumer. | |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "description": "jack is the most important API consumer.",
- "name": "jack",
- "credentials": {
- "basic_auth": {
- "password": "string",
- "username": "string"
}, - "hmac_auth": {
- "access_key": "string",
- "algorithm": "hmac-sha1",
- "clock_skew": 0,
- "encode_uri_params": true,
- "max_req_body": 524288,
- "secret_key": "string",
- "signed_headers": [
- "string"
], - "validate_request_body": false
}, - "key_auth": {
- "key": "d41d8cd98f00b204e9800998ecf8427e"
}, - "jwt_auth": {
- "key": "user-key",
- "secret": "my-secret-key",
- "base_64_secret": true,
- "algorithm": "HS256"
}
}, - "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Delete Consumer
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
consumer_id required | string non-empty ^[1-9][0-9]*$ ConsumerId is the consumer id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Create an JSON Web Token
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
consumer_id required | string non-empty ^[1-9][0-9]*$ ConsumerId is the consumer id |
Request Body schema: application/json
ttl | integer <int64> >= 1 Default: 86400 TTL is the time to live of token. |
custom_payload | object CustomPayload contains some custom key-value fields. These fields will also be kept in the JSON Web Token. |
Responses
Request samples
- Payload
{- "ttl": 86400,
- "custom_payload": { }
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
List Certificates
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
query Parameters
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
order_by | string Default: "updated_at" Enum: "expiry_time" "created_at" "updated_at" |
labels | Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used to filter the result |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string",
- "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "client_ca_certificate": {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string"
}, - "labels": [
- "string"
]
}
]
}
}
Create Certificate
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Request Body schema: application/json
certificate required | string [ 128 .. 65536 ] characters The certificate in PEM format. |
private_key required | string [ 128 .. 65536 ] characters The private key for the corresponding certificate in PEM format. |
client_ca_certificate | string [ 128 .. 65536 ] characters The client CA certificate in PEM format. |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "certificate": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "private_key": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "client_ca_certificate": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string",
- "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "client_ca_certificate": {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string"
}, - "labels": [
- "string"
]
}
}
Get Certificate Details
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
certificate_id required | string^[1-9][0-9]*$ CertificateId is the certificate id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string",
- "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "client_ca_certificate": {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string"
}, - "labels": [
- "string"
]
}
}
Update Certificate
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
certificate_id required | string^[1-9][0-9]*$ CertificateId is the certificate id |
Request Body schema: application/json
certificate required | string [ 128 .. 65536 ] characters The certificate in PEM format. |
private_key required | string [ 128 .. 65536 ] characters The private key for the corresponding certificate in PEM format. |
client_ca_certificate | string [ 128 .. 65536 ] characters The client CA certificate in PEM format. |
labels | Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ] Labels are used for resources classification and indexing |
Responses
Request samples
- Payload
{- "certificate": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "private_key": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "client_ca_certificate": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "labels": [
- "string"
]
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string",
- "control_plane_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "client_ca_certificate": {
- "extensions": {
- "property1": "string",
- "property2": "string"
}, - "issuer": "string",
- "not_after": "2019-08-24T14:15:22Z",
- "not_before": "2019-08-24T14:15:22Z",
- "serial_number": "string",
- "signature_algorithm": "string",
- "snis": [
- "string"
], - "subject": "string"
}, - "labels": [
- "string"
]
}
}
deleteCertificate
Delete Certificate
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
certificate_id required | string^[1-9][0-9]*$ CertificateId is the certificate id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
List Members
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
query Parameters
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
order_by | string Default: "updated_at" Enum: "id" "org_id" "role" "user_id" "created_at" "updated_at" |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "avatar_url": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "email": "string",
- "first_name": "string",
- "id": "string",
- "state": "Pending",
- "last_name": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
Get Member Details
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
member_id required | string >= 1 MemberID is the member id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "avatar_url": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "email": "string",
- "first_name": "string",
- "id": "string",
- "state": "Pending",
- "last_name": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
}
Update Member
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
member_id required | string >= 1 MemberID is the member id |
Request Body schema: application/json
created_at | string <date-time> CreatedAt is the object creation time. |
first_name | string^[A-Za-z0-9-]{1,32}$ FirstName is the member first name |
id | string^[1-9][0-9]*$ ID is a unique identifier for an object. |
last_name | string^[A-Za-z0-9-]{1,32}$ LastName is the member last name |
org_id | string OrgId indicates the organization where the member is in. |
state | string Enum: "Pending" "Active" State indicates the state of the member.
|
status | integer <int32> Enum: 0 50 100 the status of entity, candidate values are:
|
updated_at | string <date-time> UpdatedAt is the last modified time of this object. |
user_id | string UserId refers to an user, since an 3rd party User Management Service might be used so the type is not int64. |
Responses
Request samples
- Payload
{- "created_at": "2019-08-24T14:15:22Z",
- "first_name": "string",
- "id": "string",
- "last_name": "string",
- "org_id": "string",
- "state": "Pending",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "user_id": "string"
}
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Get Plan Details
Authorizations:
path Parameters
id required | string non-empty ^[1-9][0-9]*$ ID is the organization id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "current_api_calls": 0,
- "current_apis": 0,
- "current_applications": 0,
- "current_members": 0,
- "max_api_calls": 0,
- "max_applications": 0,
- "plan_expire_time": "2019-08-24T14:15:22Z",
- "plan_name": "string"
}
}
List Regions
Authorizations:
query Parameters
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
order_by | string Default: "created_at" Enum: "id" "name" "created_at" "updated_at" OrderBy is the name of field to be sorted (case-sensitive). Default value is created_at. |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "name": "string",
- "provider": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
Callback API for the Identity Server
Authorizations:
query Parameters
state required | string State is the field of OIDC protocol |
code required | string Code is the field of OIDC protocol |
Responses
Response samples
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Response samples
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Response samples
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Response samples
- 200
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "error": "string",
- "payload": {
- "avatar_url": "string",
- "connection": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "email": "string",
- "first_name": "string",
- "id": "string",
- "last_name": "string",
- "org_ids": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z"
}, - "status": {
- "code": 0,
- "message": "OK"
}
}
}
Response samples
- 200
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "id": "string",
- "expire_at": 0,
- "notes": "string"
}
]
}
}
Create Personal Access Token
Authorizations:
Request Body schema: application/json
expire required | integer <int64> |
notes | string <= 256 characters Notes is the description for the token. |
Responses
Request samples
- Payload
{- "expire": 0,
- "notes": "string"
}
Response samples
- 200
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "id": "string",
- "access_token": "string"
}
}
Response samples
- 200
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
Response samples
- 200
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}
}
List Labels
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
label_source required | string Enum: "api" "application" "consumer" "certificate" label_source indicates the source of the labels |
Responses
Response samples
- 200
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": [
- [
- "string"
]
]
}
Generate Control Plane Certificate
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "ca_certificate": "string",
- "certificate": "string",
- "private_key": "string"
}
}
List DP Instances
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "api_calls": 0,
- "config_version": 0,
- "domain": "string",
- "etcd_reachable": true,
- "hostname": "string",
- "id": "string",
- "ip": "string",
- "version": "string",
- "last_seen_time": "2019-08-24T14:15:22Z",
- "register_time": "2019-08-24T14:15:22Z",
- "status": "Healthy"
}
]
}
}
Get DP Instance Configuration Template
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
config_type required | string Enum: "apisix" "helm" config_type is used to filter the config
|
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "configuration": "string"
}
}
Get Control Plane Metrics
Authorizations:
path Parameters
control_plane_id required | string non-empty ^[1-9][0-9]*$ ControlPlaneID is the control plane id |
metric_type required | string Enum: "api-requests" "api-failure-requests" "api-status-dist" "api-latency" "api-bandwidth" "api-connections" "api-qps" metrics_type is used to filter the metrics
|
query Parameters
start required | string <date-time> Example: start=2006-01-02T15:04:05Z07:00 Start time of query time range, the date-time notation as defined by RFC 3339. |
end required | string <date-time> Example: end=2006-01-02T15:04:05Z07:00 End time of query time range, the date-time notation as defined by RFC 3339. |
step required | integer <int64> Example: step=15 Query resolution step width in the number of seconds. |
api_id | string^[1-9][0-9]*$ api_id is used to filter by specific the api id |
app_id | string^[1-9][0-9]*$ app_id is used to filter by specific application id |
instance_id | string^[A-Za-z0-9_-]*$ instance_id is used to filter by specific instance id |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "data": { },
- "key": "string",
- "type": "string"
}
]
}
}
List Canary Release Rules
Authorizations:
path Parameters
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
query Parameters
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
direction | string Default: "DESC" Enum: "ASC" "DESC" Direction should be ASC or DESC (case-insensitive). Default value is DESC. |
page_size | integer <int64> >= 1 Default: 10 PageSize is the page size. Must greater than 0. |
page | integer <int64> >= 1 Default: 1 Page is the page number, starting from 1. |
search | string search is used to filter the result |
Responses
Response samples
- 200
- default
{- "error": "string",
- "status": {
- "code": 0,
- "message": "OK"
}, - "payload": {
- "count": 0,
- "list": [
- {
- "name": "string",
- "state": "paused",
- "type": "percent",
- "canary_upstream_version": "string",
- "percent": 1,
- "rules": [
- {
- "position": "header",
- "key": "string",
- "operator": "==",
- "value": [
- "string"
]
}
], - "app_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "status": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
Create Canary Release Rule
Authorizations:
path Parameters
app_id required | string^[1-9][0-9]*$ The id of the pet to retrieve |
Request Body schema: application/json
name required | string [ 1 .. 64 ] characters name specify the name of canary release |
state | string Enum: "paused" "in_progress" "finished" state specify the state of the canary release |
type required | string Enum: "percent" "rule" type specify the type of canary release |
canary_upstream_version |