Download OpenAPI specification:Download
使用 API7 企业版 Admin API 创建和管理 API7 资源。
| name required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
| desc | string 对象描述 |
| hosts | Array of strings [ 1 .. 32 ] items unique [ items^\*?[0-9a-zA-Z-._]+$ ] 服务的 HTTP 主机,用于接收传入的请求。 |
| path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
| plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}
}
}
}
}{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}, - "key": "string",
- "warning_msg": "string"
}| page | integer <int64> >= 1 页码,从 1 开始。 |
| page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
| direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
| order_by | string Default: "updated_at" Enum: "created_at" "updated_at" "last_published" |
| search | string 搜索关键字 |
object non-empty | |
| gateway_group_id | string >= 1 |
| last_publish_start_at | integer >= 0 |
| last_publish_end_at | integer >= 0 |
| is_permitted | boolean Default: false 筛选当前用户有操作权限的资源。 |
{- "list": [
- {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}| service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}, - "key": "string",
- "warning_msg": "string"
}| service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
| name required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
| desc | string 对象描述 |
| hosts | Array of strings [ 1 .. 32 ] items unique [ items^\*?[0-9a-zA-Z-._]+$ ] 服务的 HTTP 主机,用于接收传入的请求。 |
| path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
| plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}
}
}
}
}{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}, - "key": "string",
- "warning_msg": "string"
}| service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
| dry-run | string Value: "all" 配置是否在试运行模式下进行操作。 |
| name | string [ 1 .. 1024 ] characters 对象名称 |
object | |
| desc | string 对象描述 |
| hosts | Array of strings [ 1 .. 32 ] items unique [ items^\*?[0-9a-zA-Z-._]+$ ] 服务的 HTTP 主机,用于接收传入的请求。 |
| path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
| plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}
}
}
}
}{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}, - "key": "string",
- "warning_msg": "string"
}| create_new_version | boolean 配置是否为更新的服务创建新的服务版本。 |
| gateway_group_id | string^[a-zA-Z0-9-_.]+$ 对象 ID |
Array of objects non-empty [ items non-empty ] |
{- "create_new_version": true,
- "gateway_group_id": "string",
- "services": [
- {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}
}
}
}, - "service_id": "string",
- "version": "string",
- "service_version_id": "string",
- "status": 0
}
]
}{- "value": { },
- "key": "string",
- "warning_msg": "string"
}| create_new_version | boolean 配置是否为更新的服务创建新的服务版本。 |
| gateway_group_id | string^[-_a-zA-Z0-9]+$ 对象 ID |
Array of objects non-empty |
{- "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
}
]
}{- "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"
}
]
]
}, - "key": "string",
- "warning_msg": "string"
}| service_id required | string^[-_a-zA-Z0-9]+$ 服务 ID |
| direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
| page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
| page | integer <int64> >= 1 页码,从 1 开始。 |
| order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
| roles | Array of strings >= 1 |
{- "list": [
- {
- "id": "string",
- "email": "string",
- "last_name": "string",
- "first_name": "string",
- "username": "string",
- "created_at": 0,
- "updated_at": 0,
- "state": "string",
- "login_option": {
- "id": "string",
- "name": "string",
- "logo": "string",
- "provider_type": "string"
}, - "roles": [
- {
- "id": "string",
- "name": "string",
- "org_id": "string",
- "permissions": [
- "string"
], - "scope_type": "gateway_group",
- "scopes": [
- {
- "id": "string",
- "name": "string"
}
]
}
]
}
], - "total": 0
}| service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
{- "list": [
- {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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",
- "status": 0
}
], - "total": 0
}| page | integer <int64> >= 1 页码,从 1 开始。 |
| page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
| direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
| order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
| search | string 搜索关键字 |
| gateway_group_id required | string >= 1 |
{- "list": [
- {
- "uri": "string",
- "prefix": "string",
- "token": "string",
- "secret_id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}| secret_manager required | string Value: "vault" |
| secret_id required | string |
{- "value": {
- "uri": "string",
- "prefix": "string",
- "token": "string",
- "secret_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}| secret_manager required | string Value: "vault" |
| secret_id required | string |
| gateway_group_id required | string >= 1 |
| uri required | string^[^/]+://([\da-zA-Z.-]+|\[[\da-fA-F:]+\])(:\d... |
| prefix required | string |
| token required | string |
{- "uri": "string",
- "prefix": "string",
- "token": "string"
}{- "value": {
- "uri": "string",
- "prefix": "string",
- "token": "string",
- "secret_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}| scope | string Enum: "partial" "all" 服务范围,可以是全部服务,也可以是部分服务。 |
| service_ids | Array of strings[ items^[a-zA-Z0-9-_.]+$ ] 服务 ID 列表 |
required | object |
Array of objects |
{- "service_ids": [
- "string"
], - "info": {
- "title": "string",
- "version": "string",
- "desc": "string"
}, - "servers": [
- {
- "url": "string",
- "desc": "string"
}
]
}{- "value": {
- "openapi": "3.0.1",
- "info": {
- "title": "string",
- "version": "string",
- "desc": "string"
}, - "servers": [
- {
- "url": "string",
- "desc": "string"
}
], - "paths": {
- "property1": {
- "get": {
- "responses": { }
}, - "put": {
- "responses": { }
}, - "post": {
- "responses": { }
}, - "delete": {
- "responses": { }
}, - "options": {
- "responses": { }
}, - "head": {
- "responses": { }
}, - "patch": {
- "responses": { }
}
}, - "property2": {
- "get": {
- "responses": { }
}, - "put": {
- "responses": { }
}, - "post": {
- "responses": { }
}, - "delete": {
- "responses": { }
}, - "options": {
- "responses": { }
}, - "head": {
- "responses": { }
}, - "patch": {
- "responses": { }
}
}
}
}, - "key": "string",
- "warning_msg": "string"
}Array of objects non-empty unique | |
| name required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
| desc | string 对象描述 |
| hosts | Array of strings [ 1 .. 32 ] items unique [ items^\*?[0-9a-zA-Z-._]+$ ] 服务的 HTTP 主机,用于接收传入的请求。 |
| path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
| plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
{- "routes": [
- {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true
}
], - "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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
}
}
}
}
}{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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,
- "routes": [
- {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}
]
}, - "key": "string",
- "warning_msg": "string"
}| raw_openapi required | string 原始 OpenAPI |
{- "raw_openapi": "string"
}{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "hosts": [
- "string"
], - "path_prefix": "string",
- "plugins": { },
- "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"
}
}, - "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": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true
}
]
}, - "key": "string",
- "warning_msg": "string"
}{- "value": {
- "customer": "API7",
- "effective_at": 1654012800,
- "expired_at": 1717171200,
- "max_dp_cores": 100,
- "runtime": {
- "status": "dp_core_exceeded",
- "dp_core_exceeded_start_at": 0,
- "dp_core_exceeded_end_at": 0,
- "max_dp_cores": 0
}, - "status": "normal"
}, - "key": "string",
- "warning_msg": "string"
}| dry-run | string Value: "all" 配置是否在试运行模式下进行操作。 |
| data required | string 编码的许可证数据 |
{- "data": "”xxxx1N-tNaTpttX-NjOdXjyg\""
}{- "value": {
- "customer": "API7",
- "effective_at": 1654012800,
- "expired_at": 1717171200,
- "max_dp_cores": 100
}, - "key": "string",
- "warning_msg": "string"
}| name required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
| desc | string 对象描述 |
| methods | Array of strings [ 1 .. 9 ] items unique Items Enum: "GET" "POST" "PUT" "DELETE" "PATCH" "HEAD" "OPTIONS" "TRACE" 允许访问路由的 HTTP 方法。如果为空,则允许所有 HTTP 方法。 |
| paths required | Array of strings [ 1 .. 64 ] items [ items [ 1 .. 4096 ] characters ^/ ] 与 API 匹配的 URI 路径。 |
| plugins | object 键值对,用于表示与目标对象关联的插件。 |
| enable_websocket | boolean 配置是否为路由启用 Websocket。 |
| service_id required | string^[a-zA-Z0-9-_.]+$ 对象 ID |
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "service_id": "string"
}{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}| service_id | string^[a-zA-Z0-9-_.]+$ 服务 ID |
| page | integer <int64> >= 1 页码,从 1 开始。 |
| page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
| direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
| order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
| search | string 搜索关键字 |
object non-empty |
{- "list": [
- {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}| route_id required | string^[a-zA-Z0-9-_.]+$ 路由 ID |
object non-empty |
{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}| route_id required | string^[a-zA-Z0-9-_.]+$ 路由 ID |
| name required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
| desc | string 对象描述 |
| methods | Array of strings [ 1 .. 9 ] items unique Items Enum: "GET" "POST" "PUT" "DELETE" "PATCH" "HEAD" "OPTIONS" "TRACE" 允许访问路由的 HTTP 方法。如果为空,则允许所有 HTTP 方法。 |
| paths required | Array of strings [ 1 .. 64 ] items [ items [ 1 .. 4096 ] characters ^/ ] 与 API 匹配的 URI 路径。 |
| plugins | object 键值对,用于表示与目标对象关联的插件。 |
| enable_websocket | boolean 配置是否为路由启用 Websocket。 |
| service_id | string^[a-zA-Z0-9-_.]+$|^$ 对象 ID |
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "service_id": "string"
}{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "id": "string",
- "service_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}| route_id required | string^[a-zA-Z0-9-_.]+$ 路由 ID |
| name | string [ 1 .. 1024 ] characters 对象名称 |
object | |
| desc | string 对象描述 |
| methods | Array of strings [ 1 .. 9 ] items unique Items Enum: "GET" "POST" "PUT" "DELETE" "PATCH" "HEAD" "OPTIONS" "TRACE" 允许访问路由的 HTTP 方法。如果为空,则允许所有 HTTP 方法。 |
| paths | Array of strings [ 1 .. 64 ] items [ items [ 1 .. 4096 ] characters ^/ ] |