API7 Enterprise Admin APIs (3.5.2)
Download OpenAPI specification:Download
API7 Enterprise Admin APIs are RESTful APIs that allow you to create and manage API7 resources.
Create a published service on a gateway group.
IAM Action: gateway:CreatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/*
Authorizations:
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name | string [ 1 .. 65536 ] characters The object name. |
object | |
desc | string <= 65536 characters The object description. |
plugins | object The key-value pairs which represent the plugins attached on the object. |
type required | string Default: "http" Enum: "http" "stream" |
hosts | Array of strings [ 1 .. 32 ] items unique The hosts for the service to accept incoming requests. |
path_prefix | string [ 1 .. 4096 ] characters ^/ The listening path prefix of the service. |
strip_path_prefix | boolean Default: true Weather strip the path prefix or not when proxying the request to the upstream. |
object The upstream contains necessary information for the gateway to proxy request to the backend service. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "upstream": {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}
}
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "last_published": 0,
- "published_gateway_groups_count": 0,
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
List all published services on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
query Parameters
page | integer <int64> >= 1 The page number, starting from 1. |
page_size | integer <int64> >= 1 The page size. It must be greater than 0. |
direction | string Default: "desc" Enum: "asc" "desc" It should be ascending or descending (case-insensitive). By default, it is set to descending. |
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" "last_published" "name" |
search | string The search keyword. |
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
runtime_type | string Enum: "normal" "canary" |
unhealthy_nodes | Array of strings Items Enum: "unhealthy_nodes_exists" "no_unhealthy_nodes" |
object non-empty | |
hosts | Array of strings |
type | Array of strings Items Enum: "http" "stream" |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "last_published": 0,
- "published_gateway_groups_count": 0,
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}
Get a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "last_published": 0,
- "published_gateway_groups_count": 0,
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Updatea published service(without publishing).
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name | string [ 1 .. 65536 ] characters The object name. |
object | |
desc | string <= 65536 characters The object description. |
plugins | object The key-value pairs which represent the plugins attached on the object. |
type required | string Default: "http" Enum: "http" "stream" |
hosts | Array of strings [ 1 .. 32 ] items unique The hosts for the service to accept incoming requests. |
path_prefix | string [ 1 .. 4096 ] characters ^/ The listening path prefix of the service. |
strip_path_prefix | boolean Default: true Weather strip the path prefix or not when proxying the request to the upstream. |
object The upstream contains necessary information for the gateway to proxy request to the backend service. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "upstream": {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}
}
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "last_published": 0,
- "published_gateway_groups_count": 0,
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Patch a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
op required | string Enum: "add" "replace" The operation to be performed |
path required | string A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information |
value required | any The value to add or replace, can be any type |
Responses
Request samples
- Payload
[- {
- "op": "add",
- "path": "string",
- "value": null
}
]
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "last_published": 0,
- "published_gateway_groups_count": 0,
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Delete a published service on a gateway group.
IAM Action: gateway:DeletePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": { },
- "warning_msg": "string"
}
Create a upstream in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name | string [ 1 .. 65536 ] characters Default: "default" The object name. |
scheme | string Default: "http" Enum: "http" "https" "grpc" "grpcs" The protocol that is used for communicating with the backend service when the service type is |
desc | string <= 65536 characters The object description. |
type | string Default: "roundrobin" Enum: "roundrobin" "least_conn" "ewma" "chash" The load balancing strategy to distribute traffic to targets. |
hash_on | string Default: "vars" Enum: "vars" "header" "cookie" "consumer" "vars_combinations" Define what to use as hashing input. Accepted values are |
key | string non-empty The key is used for consistent hash, which can be combined using variables, such as $host$uri. |
retries | integer [ 0 .. 65535 ] The number of retries while passing the request to an upstream using the underlying Nginx mechanism. |
object The upstream separate connection pool. | |
object The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds). | |
retry_timeout | number <float> >= 0 Default: 0 |
pass_host | string Default: "pass" Enum: "pass" "node" "rewrite" Define how to decide the host header before forwarding requests to an upstream. |
upstream_host | string^\*?[0-9a-zA-Z-._]+$ The HTTP host. |
Array of objects <= 64 items The upstream endpoints. | |
service_name | string [ 1 .. 256 ] characters |
discovery_type | string Enum: "kubernetes" "nacos" |
object | |
object or object Deprecated Replace with | |
client_certificate | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The object ID. |
ca_certificates | Array of strings[ items [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ ] |
tls_verify | boolean |
object or object The health check data. |
Responses
Request samples
- Payload
{- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}, - "id": "string",
- "gateway_group_id": "string",
- "apisix_service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
List all upstreams in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
order_by | string Default: "created_at" Value: "created_at" |
direction | string Default: "asc" Value: "asc" |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}, - "id": "string",
- "gateway_group_id": "string",
- "apisix_service_id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}
Get a upstream in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
upstream_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the upstream. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}, - "id": "string",
- "gateway_group_id": "string",
- "apisix_service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Update a upstream in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
upstream_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the upstream. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name | string [ 1 .. 65536 ] characters Default: "default" The object name. |
scheme | string Default: "http" Enum: "http" "https" "grpc" "grpcs" The protocol that is used for communicating with the backend service when the service type is |
desc | string <= 65536 characters The object description. |
type | string Default: "roundrobin" Enum: "roundrobin" "least_conn" "ewma" "chash" The load balancing strategy to distribute traffic to targets. |
hash_on | string Default: "vars" Enum: "vars" "header" "cookie" "consumer" "vars_combinations" Define what to use as hashing input. Accepted values are |
key | string non-empty The key is used for consistent hash, which can be combined using variables, such as $host$uri. |
retries | integer [ 0 .. 65535 ] The number of retries while passing the request to an upstream using the underlying Nginx mechanism. |
object The upstream separate connection pool. | |
object The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds). | |
retry_timeout | number <float> >= 0 Default: 0 |
pass_host | string Default: "pass" Enum: "pass" "node" "rewrite" Define how to decide the host header before forwarding requests to an upstream. |
upstream_host | string^\*?[0-9a-zA-Z-._]+$ The HTTP host. |
Array of objects <= 64 items The upstream endpoints. | |
service_name | string [ 1 .. 256 ] characters |
discovery_type | string Enum: "kubernetes" "nacos" |
object | |
object or object Deprecated Replace with | |
client_certificate | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The object ID. |
ca_certificates | Array of strings[ items [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ ] |
tls_verify | boolean |
object or object The health check data. |
Responses
Request samples
- Payload
{- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}, - "id": "string",
- "gateway_group_id": "string",
- "apisix_service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Patch a upstream in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
upstream_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the upstream. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
op required | string Enum: "add" "replace" The operation to be performed |
path required | string A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information |
value required | any The value to add or replace, can be any type |
Responses
Request samples
- Payload
[- {
- "op": "add",
- "path": "string",
- "value": null
}
]
Response samples
- 200
- 400
- default
{- "value": {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}, - "id": "string",
- "gateway_group_id": "string",
- "apisix_service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Delete a upstream in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
upstream_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the upstream. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": { },
- "warning_msg": "string"
}
Import services based on OpenAPI Specification.
IAM Action: gateway:CreatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/*
Authorizations:
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
Array of objects non-empty unique | |
name | string [ 1 .. 65536 ] characters The object name. |
object | |
desc | string <= 65536 characters The object description. |
plugins | object The key-value pairs which represent the plugins attached on the object. |
type required | string Default: "http" Enum: "http" "stream" |
hosts | Array of strings [ 1 .. 32 ] items unique The hosts for the service to accept incoming requests. |
path_prefix | string [ 1 .. 4096 ] characters ^/ The listening path prefix of the service. |
strip_path_prefix | boolean Default: true Weather strip the path prefix or not when proxying the request to the upstream. |
object The upstream contains necessary information for the gateway to proxy request to the backend service. |
Responses
Request samples
- Payload
{- "routes": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}
}
], - "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "upstream": {
- "name": "default",
- "scheme": "http",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "retries": 65535,
- "keepalive_pool": {
- "size": 320,
- "idle_timeout": 60,
- "requests": 1000
}, - "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "retry_timeout": 0,
- "pass_host": "pass",
- "upstream_host": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}, - "tls": {
- "client_cert": "string",
- "client_key": "string"
}, - "client_certificate": "string",
- "ca_certificates": [
- "string"
], - "tls_verify": true,
- "checks": {
- "active": {
- "type": "http",
- "timeout": 1,
- "concurrency": 10,
- "host": "string",
- "port": 1,
- "http_path": "/",
- "https_verify_certificate": true,
- "req_headers": [
- "string"
], - "healthy": {
- "interval": 1,
- "http_statuses": [
- 200,
- 302
], - "successes": 2
}, - "unhealthy": {
- "interval": 1,
- "http_statuses": [
- 429,
- 404,
- 500,
- 501,
- 502,
- 503,
- 504,
- 505
], - "http_failures": 5,
- "tcp_failures": 2,
- "timeouts": 3
}
}, - "passive": {
- "type": "http",
- "healthy": {
- "http_statuses": [
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 226,
- 300,
- 301,
- 302,
- 303,
- 304,
- 305,
- 306,
- 307,
- 308
], - "successes": 5
}, - "unhealthy": {
- "http_statuses": [
- 429,
- 500,
- 503
], - "tcp_failures": 2,
- "timeouts": 7,
- "http_failures": 5
}
}
}
}
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "service_id": "string",
- "version": "string",
- "created_at": 0,
- "gateway_group_name": "string",
- "gateway_group_id": "string",
- "unhealthy_nodes_count": 0,
- "status": 0
}, - "warning_msg": "string"
}
Convert OpenAPI Specification to service and route resources.
Authorizations:
Request Body schema: application/json
raw_openapi required | string The raw OpenAPI. |
Responses
Request samples
- Payload
{- "raw_openapi": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "routes": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}
}
]
}, - "warning_msg": "string"
}
Create a route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name required | string [ 1 .. 65536 ] characters The object name. |
object | |
desc | string <= 65536 characters The object description. |
methods | Array of strings [ 1 .. 9 ] items unique Items Enum: "GET" "POST" "PUT" "DELETE" "PATCH" "HEAD" "OPTIONS" "TRACE" The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed. |
vars | Array of any Matches based on the specified variables consistent with variables in Nginx. Takes the form [[var, operator, val], [var, operator, val], ...]]. Note that this is case sensitive when matching a cookie name. See https://github.com/api7/lua-resty-expr for more details. |
paths required | Array of strings [ 1 .. 64 ] items [ items [ 1 .. 4096 ] characters ^/ ] The URI paths that can be matched to the API. |
priority | integer Default: 0 If different Routes matches to the same uri, then the Route is matched based on its priority. A higher value corresponds to higher priority. |
plugins | object The key-value pairs which represent the plugins attached on the object. |
enable_websocket | boolean Define whether to enable Websocket for the route. |
object The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds). | |
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The object ID. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "service_id": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
List all routes in a published service.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
query Parameters
service_id | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
page | integer <int64> >= 1 The page number, starting from 1. |
page_size | integer <int64> >= 1 The page size. It must be greater than 0. |
direction | string Default: "desc" Enum: "asc" "desc" It should be ascending or descending (case-insensitive). By default, it is set to descending. |
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
search | string The search keyword. |
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}
Get a route in a published servcie on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
route_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published route. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Update a route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
route_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published route. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name required | string [ 1 .. 65536 ] characters The object name. |
object | |
desc | string <= 65536 characters The object description. |
methods | Array of strings [ 1 .. 9 ] items unique Items Enum: "GET" "POST" "PUT" "DELETE" "PATCH" "HEAD" "OPTIONS" "TRACE" The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed. |
vars | Array of any Matches based on the specified variables consistent with variables in Nginx. Takes the form [[var, operator, val], [var, operator, val], ...]]. Note that this is case sensitive when matching a cookie name. See https://github.com/api7/lua-resty-expr for more details. |
paths required | Array of strings [ 1 .. 64 ] items [ items [ 1 .. 4096 ] characters ^/ ] The URI paths that can be matched to the API. |
priority | integer Default: 0 If different Routes matches to the same uri, then the Route is matched based on its priority. A higher value corresponds to higher priority. |
plugins | object The key-value pairs which represent the plugins attached on the object. |
enable_websocket | boolean Define whether to enable Websocket for the route. |
object The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds). | |
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The object ID. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "service_id": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Patch a route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
route_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published route. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
op required | string Enum: "add" "replace" The operation to be performed |
path required | string A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information |
value required | any The value to add or replace, can be any type |
Responses
Request samples
- Payload
[- {
- "op": "add",
- "path": "string",
- "value": null
}
]
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Delete a route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
route_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published route. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": { },
- "warning_msg": "string"
}
Create a stream route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name required | string [ 1 .. 100 ] characters The object name. |
object | |
desc | string <= 65536 characters The object description. |
plugins | object The key-value pairs which represent the plugins attached on the object. |
IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string) | |
(IPAddress (IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string))) or Domain (string) | |
server_port | integer <= 65535 |
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The object ID. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "service_id": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
List all stream routes in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
query Parameters
service_id | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published service. |
page | integer <int64> >= 1 The page number, starting from 1. |
page_size | integer <int64> >= 1 The page size. It must be greater than 0. |
direction | string Default: "desc" Enum: "asc" "desc" It should be ascending or descending (case-insensitive). By default, it is set to descending. |
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
search | string The search keyword. |
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}
Get a stream stream route in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
stream_route_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published stream route. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Update a stream route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
stream_route_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published stream route. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Request Body schema: application/json
name required | string [ 1 .. 100 ] characters The object name. |
object | |
desc | string <= 65536 characters The object description. |
plugins | object The key-value pairs which represent the plugins attached on the object. |
IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string) | |
(IPAddress (IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string))) or Domain (string) | |
server_port | integer <= 65535 |
service_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The object ID. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "service_id": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "warning_msg": "string"
}
Delete a stream route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
stream_route_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the published stream route. |
query Parameters
gateway_group_id required | string >= 1 It's optional when client authenticate with gateway group admin key. |
Responses
Response samples
- 200
- 400
- default
{- "value": { },
- "warning_msg": "string"
}
List all published services in a gateway group. Deprecated
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Deprecated, you can use GET /apisix/admin/services
for instead.
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
query Parameters
runtime_type | string Enum: "normal" "canary" |
unhealthy_nodes | Array of strings Items Enum: "unhealthy_nodes_exists" "no_unhealthy_nodes" |
direction | string Default: "desc" Enum: "asc" "desc" It should be ascending or descending (case-insensitive). By default, it is set to descending. |
page_size | integer <int64> >= 1 The page size. It must be greater than 0. |
page | integer <int64> >= 1 The page number, starting from 1. |
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" "publish_time" "name" |
search | string The search keyword. |
object non-empty | |
hosts | Array of strings |
type | Array of strings Items Enum: "http" "stream" |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "service_id": "string",
- "version": "string",
- "created_at": 0,
- "gateway_group_name": "string",
- "gateway_group_id": "string",
- "unhealthy_nodes_count": 0,
- "status": 0
}
], - "total": 0
}
Get a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
Responses
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "http",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "strip_path_prefix": true,
- "id": "string",
- "service_id": "string",
- "version": "string",
- "created_at": 0,
- "gateway_group_name": "string",
- "gateway_group_id": "string",
- "unhealthy_nodes_count": 0,
- "status": 0
}, - "warning_msg": "string"
}
Delete a published service on a gateway group.
IAM Action: gateway:DeletePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
Responses
Response samples
- 200
- default
{- "value": { },
- "warning_msg": "string"
}
Get the OpenAPI Specification of a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
Responses
Response samples
- 200
- default
{- "value": {
- "raw_openapi": "string",
- "api_count": 0,
- "api_desc": "string"
}, - "warning_msg": "string"
}
Update the OpenAPI Specification of a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
Request Body schema: application/json
raw_openapi | string The raw OpenAPI specification of the service. |
Responses
Request samples
- Payload
{- "raw_openapi": "string"
}
Response samples
- 200
- default
{- "value": {
- "raw_openapi": "string",
- "api_count": 0,
- "api_desc": "string"
}, - "warning_msg": "string"
}
List all routes of published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
query Parameters
page | integer <int64> >= 1 The page number, starting from 1. |
page_size | integer <int64> >= 1 The page size. It must be greater than 0. |
direction | string Default: "desc" Enum: "asc" "desc" It should be ascending or descending (case-insensitive). By default, it is set to descending. |
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "route_id": "string",
- "service_version_id": "string"
}
], - "total": 0
}
Get a route in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
route_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the route template. |
Responses
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "vars": [
- null
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "route_id": "string",
- "service_version_id": "string"
}, - "warning_msg": "string"
}
Get the runtime configuration of a route in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
route_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the route template. |
Responses
Response samples
- 200
- default
{- "value": {
- "plugins": { }
}, - "warning_msg": "string"
}
Update the runtime configuration of a route in a published service on a gateway group.
IAM Action: gateway:UpdatePublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
route_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the route template. |
Request Body schema: application/json
op required | string Enum: "add" "replace" The operation to be performed |
path required | string A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information |
value required | any The value to add or replace, can be any type |
Responses
Request samples
- Payload
[- {
- "op": "add",
- "path": "string",
- "value": null
}
]
Response samples
- 200
- default
{- "value": {
- "plugins": { }
}, - "warning_msg": "string"
}
List all stream routes of a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
query Parameters
page | integer <int64> >= 1 The page number, starting from 1. |
page_size | integer <int64> >= 1 The page size. It must be greater than 0. |
direction | string Default: "desc" Enum: "asc" "desc" It should be ascending or descending (case-insensitive). By default, it is set to descending. |
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "id": "string",
- "stream_route_id": "string",
- "service_version_id": "string"
}
], - "total": 0
}
Get a stream route in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
stream_route_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the stream route template. |
Responses
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "remote_addr": "127.0.0.1",
- "server_addr": "mysql",
- "server_port": 3306,
- "id": "string",
- "stream_route_id": "string",
- "service_version_id": "string"
}, - "warning_msg": "string"
}
Get the runtime configuration of a stream route in a published service on a gateway group.
IAM Action: gateway:GetPublishedService
, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
stream_route_template_id required | string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ The unique identifier of the stream route template. |