API7 Enterprise Admin APIs (3.2.16.1)
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 | 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": "stream",
- "upstream": {
- "name": "default",
- "scheme": "tcp",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "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,
- "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"
}, - "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",
- "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 |
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,
- "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"
}, - "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",
- "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^[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,
- "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"
}, - "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",
- "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^[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 | 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": "stream",
- "upstream": {
- "name": "default",
- "scheme": "tcp",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "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,
- "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"
}, - "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",
- "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^[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 |
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,
- "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"
}, - "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",
- "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^[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"
}
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
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 | 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. | |
Array of objects non-empty unique |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "plugins": { },
- "type": "stream",
- "upstream": {
- "name": "default",
- "scheme": "tcp",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "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
}
}
}
}, - "routes": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}
}
]
}
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,
- "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"
}, - "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",
- "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,
- "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"
}, - "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
}
}
}
}, - "routes": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "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. |
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^[a-zA-Z0-9-_.]+$ The object ID. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "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"
], - "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^[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"
], - "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^[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"
], - "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^[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. |
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^[a-zA-Z0-9-_.]+$ The object ID. |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "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"
], - "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^[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 |
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"
], - "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^[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 .. 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. |
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^[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^[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^[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^[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 .. 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. |
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^[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^[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 |
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,
- "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"
}, - "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",
- "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^[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,
- "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"
}, - "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",
- "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^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
Responses
Response samples
- 200
- default
{- "value": { },
- "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^[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"
], - "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^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
route_template_id required | string^[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"
], - "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"
}
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^[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^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
stream_route_template_id required | string^[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"
}
List all history versions of a published services on a gateway group by service ID.
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^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
query Parameters
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: "publish_time" Value: "publish_time" |
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,
- "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"
}, - "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",
- "service_id": "string",
- "version": "string",
- "created_at": 0,
- "publish_time": "string"
}
], - "total": 0
}
Fetch service runtime configurations 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^[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",
- "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"
}, - "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
}
}
}
}, - "status": 0,
- "plugins": { }
}, - "warning_msg": "string"
}
Update service runtime configurations 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^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
query Parameters
dry-run | string Value: "all" The flag that indicates whether to run the operation in dry-run mode. |
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 |
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": {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "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"
}, - "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
}
}
}
}, - "status": 0,
- "plugins": { }
}, - "warning_msg": "string"
}
Get healthcheck status for the upstream 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^[a-zA-Z0-9-_.]+$ The unique identifier of the service template. |
Responses
Response samples
- 200
- default
{- "value": {
- "httpbin.com:80": {
- "host": "httpbin.com",
- "port": 80,
- "total": 1,
- "healthy": 1,
- "unhealthy": 0,
- "unknown": 0,
- "updated_at": 0,
- "gateway_instances": [
- {
- "id": "xxx-yyy-zzz",
- "hostname": "api7ee3-apisix-699b68db7f-cxgcw",
- "status": "healthy",
- "created_at": 0,
- "updated_at": 0
}
]
}
}
}
List all published services connected to a service registry.
IAM Action: gateway:GetServiceRegistry
, Resource: arn:api7:gateway:gatewaygroup/%s
Authorizations:
path Parameters
service_registry_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
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" "publish_time" "name" |
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,
- "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"
}, - "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",
- "service_id": "string",
- "version": "string",
- "created_at": 0,
- "gateway_group_name": "string",
- "gateway_group_id": "string",
- "unhealthy_nodes_count": 0,
- "status": 0
}
], - "total": 0
}
Check service conflict.
Authorizations:
Request Body schema: application/json
non-emptycreate_new_version | boolean Whether to create a new service version for the updated service. |
gateway_group_id | string^[a-zA-Z0-9-_.]+$ The object ID. |
Array of objects non-empty |
Responses
Request samples
- Payload
{- "create_new_version": true,
- "gateway_group_id": "string",
- "services": [
- {
- "name": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "service_id": "string",
- "version": "string",
- "service_version_id": "string",
- "status": 0,
- "routes": [
- {
- "name": "string",
- "labels": {
- "keyA": "valueA",
- "keyB": "valueB"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "priority": 0,
- "plugins": { },
- "enable_websocket": true,
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "id": "string",
- "service_id": "string"
}
]
}
]
}
Response samples
- 200
- 400
- default
{- "value": {
- "duplicate": [
- [
- {
- "service_id": "string",
- "service_name": "string",
- "route_id": "string",
- "route_name": "string",
- "url": "string"
}
]
], - "overlapping": [
- [
- {
- "service_id": "string",
- "service_name": "string",
- "route_id": "string",
- "route_name": "string",
- "url": "string"
}
]
]
}, - "warning_msg": "string"
}
Create a service template.
IAM Action: gateway:CreateServiceTemplate
, Resource: arn:api7:gateway:servicetemplate/*
Authorizations:
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 | 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": "stream",
- "upstream": {
- "name": "default",
- "scheme": "tcp",
- "desc": "string",
- "type": "roundrobin",
- "hash_on": "vars",
- "key": "string",
- "timeout": {
- "connect": 60,
- "send": 60,
- "read": 60
}, - "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "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,
- "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"
}, - "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,