API7 企业版 Admin API 参考文档 (0.11.0)
Download OpenAPI specification:Download
使用 API7 企业版 Admin API 创建和管理 API7 资源。
创建服务
Authorizations:
Request Body schema: application/json
non-emptyname required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
desc | string 对象描述 |
hosts | Array of strings [ 1 .. 32 ] items unique 服务的 HTTP 主机,用于接收传入的请求。 |
path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
Responses
Request samples
- Payload
{- "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
}
}
}
}
}
Response samples
- 200
- 400
- default
{- "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"
}
获取所有服务
Authorizations:
query Parameters
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 筛选当前用户有操作权限的资源。 |
Responses
Response samples
- 200
- 400
- default
{- "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
}
获取特定服务
Authorizations:
path Parameters
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
Responses
Response samples
- 200
- 400
- default
{- "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"
}
更新特定服务
Authorizations:
path Parameters
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
Request Body schema: application/json
non-emptyname required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
desc | string 对象描述 |
hosts | Array of strings [ 1 .. 32 ] items unique 服务的 HTTP 主机,用于接收传入的请求。 |
path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
Responses
Request samples
- Payload
{- "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
}
}
}
}
}
Response samples
- 200
- 400
- default
{- "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"
}
更新特定服务
Authorizations:
path Parameters
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
query Parameters
dry-run | string Value: "all" 配置是否在试运行模式下进行操作。 |
Request Body schema: application/json
non-emptyname | string [ 1 .. 1024 ] characters 对象名称 |
object | |
desc | string 对象描述 |
hosts | Array of strings [ 1 .. 32 ] items unique 服务的 HTTP 主机,用于接收传入的请求。 |
path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
Responses
Request samples
- Payload
{- "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
}
}
}
}
}
Response samples
- 200
- 400
- default
{- "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"
}
发布服务
Authorizations:
Request Body schema: application/json
non-emptycreate_new_version | boolean 配置是否为更新的服务创建新的服务版本。 |
gateway_group_id | string^[a-zA-Z0-9-_.]+$ 对象 ID |
Array of objects non-empty [ items non-empty ] |
Responses
Request samples
- Payload
{- "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
}
]
}
Response samples
- 200
- 400
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
检查服务冲突
Authorizations:
Request Body schema: application/json
non-emptycreate_new_version | boolean 配置是否为更新的服务创建新的服务版本。 |
gateway_group_id | string^[-_a-zA-Z0-9]+$ 对象 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
}
]
}
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"
}
]
]
}, - "key": "string",
- "warning_msg": "string"
}
获取所有授权用户
Authorizations:
path Parameters
service_id required | string^[-_a-zA-Z0-9]+$ 服务 ID |
query Parameters
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 |
Responses
Response samples
- 200
- default
{- "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
}
获取特定的已发布服务
Authorizations:
path Parameters
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
Responses
Response samples
- 200
- 400
- default
{- "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
}
获取所有 Secret
Authorizations:
query Parameters
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 |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "uri": "string",
- "prefix": "string",
- "token": "string",
- "secret_id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}
获取特定 Secret
Authorizations:
path Parameters
secret_manager required | string Value: "vault" |
secret_id required | string |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "uri": "string",
- "prefix": "string",
- "token": "string",
- "secret_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
创建或更新特定 Secret
Authorizations:
path Parameters
secret_manager required | string Value: "vault" |
secret_id required | string |
query Parameters
gateway_group_id required | string >= 1 |
Request Body schema: application/json
uri required | string^[^/]+://([\da-zA-Z.-]+|\[[\da-fA-F:]+\])(:\d... |
prefix required | string |
token required | string |
Responses
Request samples
- Payload
{- "uri": "string",
- "prefix": "string",
- "token": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "uri": "string",
- "prefix": "string",
- "token": "string",
- "secret_id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
生成 OpenAPI 规范,导出服务
Authorizations:
query Parameters
scope | string Enum: "partial" "all" 服务范围,可以是全部服务,也可以是部分服务。 |
Request Body schema: application/json
service_ids | Array of strings 服务 ID 列表 |
required | object |
Array of objects |
Responses
Request samples
- Payload
{- "service_ids": [
- "string"
], - "info": {
- "title": "string",
- "version": "string",
- "desc": "string"
}, - "servers": [
- {
- "url": "string",
- "desc": "string"
}
]
}
Response samples
- 200
- 400
- default
{- "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"
}
基于 OpenAPI 规范导入服务
Authorizations:
Request Body schema: application/json
non-emptyArray of objects non-empty unique | |
name required | string [ 1 .. 1024 ] characters 对象名称 |
object | |
desc | string 对象描述 |
hosts | Array of strings [ 1 .. 32 ] items unique 服务的 HTTP 主机,用于接收传入的请求。 |
path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
object 上游提供用于将请求转发到后端服务的网关的必要信息。 |
Responses
Request samples
- Payload
{- "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
}
}
}
}
}
Response samples
- 200
- 400
- default
{- "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"
}
将 OpenAPI 规范转换为服务和路由资源
Authorizations:
Request Body schema: application/json
raw_openapi required | string 原始 OpenAPI |
Responses
Request samples
- Payload
{- "raw_openapi": "string"
}
Response samples
- 200
- 400
- default
{- "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"
}
Response samples
- 200
- 400
- default
{- "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"
}
导入或更新 API7 企业版许可证
Authorizations:
query Parameters
dry-run | string Value: "all" 配置是否在试运行模式下进行操作。 |
Request Body schema: application/json
data required | string 编码的许可证数据 |
Responses
Request samples
- Payload
{- "data": "”xxxx1N-tNaTpttX-NjOdXjyg\""
}
Response samples
- 200
- 400
- default
{- "value": {
- "customer": "API7",
- "effective_at": 1654012800,
- "expired_at": 1717171200,
- "max_dp_cores": 100
}, - "key": "string",
- "warning_msg": "string"
}
创建路由
Authorizations:
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "service_id": "string"
}
Response samples
- 200
- 400
- default
{- "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"
}
获取所有路由
Authorizations:
query Parameters
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 |
Responses
Response samples
- 200
- 400
- default
{- "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
}
获取特定路由
Authorizations:
path Parameters
route_id required | string^[a-zA-Z0-9-_.]+$ 路由 ID |
query Parameters
object non-empty |
Responses
Response samples
- 200
- 400
- default
{- "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"
}
更新特定路由
Authorizations:
path Parameters
route_id required | string^[a-zA-Z0-9-_.]+$ 路由 ID |
Request Body schema: application/json
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 |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "service_id": "string"
}
Response samples
- 200
- 400
- default
{- "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"
}
更新特定路由
Authorizations:
path Parameters
route_id required | string^[a-zA-Z0-9-_.]+$ 路由 ID |
Request Body schema: application/json
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 ^/ ] 与 API 匹配的 URI 路径。 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
enable_websocket | boolean 配置是否为路由启用 Websocket。 |
Responses
Request samples
- Payload
{- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true
}
Response samples
- 200
- 400
- default
{- "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"
}
创建 SSL 证书
Authorizations:
query Parameters
gateway_group_id required | string >= 1 |
Request Body schema: application/json
cert required | string [ 128 .. 65536 ] characters PEM 格式的 SSL 证书 |
certs | Array of strings [ 1 .. 16 ] items [ items [ 128 .. 65536 ] characters ] |
object | |
type | string Enum: "server" "client" SSL 证书的用途,用于客户端与上游或服务器之间的通信。 |
object | |
status | integer Enum: 0 1 对象状态。0 表示对象处于活动状态。1 表示对象处于非活动状态。 |
key required | string [ 128 .. 65536 ] characters PEM 格式的私钥 |
keys | Array of strings [ 1 .. 16 ] items [ items [ 128 .. 65536 ] characters ] |
Responses
Request samples
- Payload
{- "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "certs": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
], - "client": {
- "ca": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "depth": 1
}, - "type": "server",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "status": 0,
- "key": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "keys": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
]
}
Response samples
- 200
{- "value": {
- "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "certs": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
], - "client": {
- "ca": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "depth": 1
}, - "type": "server",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "status": 0,
- "id": "string",
- "created_at": 0,
- "updated_at": 0,
- "exptime": 0,
- "validity_start": 0,
- "validity_end": 0,
- "snis": [
- "string"
]
}, - "key": "string",
- "warning_msg": "string"
}
获取所有 SSL 证书
Authorizations:
query Parameters
gateway_group_id required | string >= 1 |
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 |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "certs": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
], - "client": {
- "ca": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "depth": 1
}, - "type": "server",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "status": 0,
- "id": "string",
- "created_at": 0,
- "updated_at": 0,
- "exptime": 0,
- "validity_start": 0,
- "validity_end": 0,
- "snis": [
- "string"
]
}
], - "total": 0
}
获取特定 SSL 证书
Authorizations:
path Parameters
ssl_id required | string^[a-zA-Z0-9-_.]+$ SSL 证书 ID |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "certs": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
], - "client": {
- "ca": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "depth": 1
}, - "type": "server",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "status": 0,
- "id": "string",
- "created_at": 0,
- "updated_at": 0,
- "exptime": 0,
- "validity_start": 0,
- "validity_end": 0,
- "snis": [
- "string"
]
}, - "key": "string",
- "warning_msg": "string"
}
更新特定 SSL 证书
Authorizations:
path Parameters
ssl_id required | string^[a-zA-Z0-9-_.]+$ SSL 证书 ID |
query Parameters
gateway_group_id | string >= 1 |
Request Body schema: application/json
cert required | string [ 128 .. 65536 ] characters PEM 格式的 SSL 证书 |
certs | Array of strings [ 1 .. 16 ] items [ items [ 128 .. 65536 ] characters ] |
object | |
type | string Enum: "server" "client" SSL 证书的用途,用于客户端与上游或服务器之间的通信。 |
object | |
status | integer Enum: 0 1 对象状态。0 表示对象处于活动状态。1 表示对象处于非活动状态。 |
key required | string [ 128 .. 65536 ] characters PEM 格式的私钥 |
keys | Array of strings [ 1 .. 16 ] items [ items [ 128 .. 65536 ] characters ] |
Responses
Request samples
- Payload
{- "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "certs": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
], - "client": {
- "ca": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "depth": 1
}, - "type": "server",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "status": 0,
- "key": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "keys": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
]
}
Response samples
- 200
- 400
- default
{- "value": {
- "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "certs": [
- "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst"
], - "client": {
- "ca": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
- "depth": 1
}, - "type": "server",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "status": 0,
- "id": "string",
- "created_at": 0,
- "updated_at": 0,
- "exptime": 0,
- "validity_start": 0,
- "validity_end": 0,
- "snis": [
- "string"
]
}, - "key": "string",
- "warning_msg": "string"
}
创建消费者
Authorizations:
query Parameters
gateway_group_id required | string >= 1 |
Request Body schema: application/json
username required | string [ 1 .. 100 ] characters ^[a-zA-Z0-9-_.]+$ 对象名称 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
desc | string 对象描述 |
object |
Responses
Request samples
- Payload
{- "username": "string",
- "plugins": { },
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- default
{- "value": {
- "username": "string",
- "plugins": { },
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
获取所有消费者
Authorizations:
query Parameters
gateway_group_id required | string >= 1 |
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 |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "username": "string",
- "plugins": { },
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}
获取特定消费者
Authorizations:
path Parameters
consumer_id required | string^[a-zA-Z0-9-_.]+$ 消费者 ID |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "username": "string",
- "plugins": { },
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
更新特定消费者
Authorizations:
path Parameters
consumer_id required | string^[a-zA-Z0-9-_.]+$ 消费者 ID |
query Parameters
gateway_group_id | string >= 1 |
Request Body schema: application/json
username required | string [ 1 .. 100 ] characters ^[a-zA-Z0-9_]+$ 对象名称 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
desc | string 对象描述 |
object |
Responses
Request samples
- Payload
{- "username": "string",
- "plugins": { },
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- default
{- "value": {
- "username": "string",
- "plugins": { },
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
更新特定消费者
Authorizations:
path Parameters
consumer_id required | string^[a-zA-Z0-9-_.]+$ 消费者 ID |
Request Body schema: application/json
username | string [ 1 .. 100 ] characters ^[a-zA-Z0-9-_.]+$ 对象名称 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
desc | string 对象描述 |
object |
Responses
Request samples
- Payload
{- "username": "string",
- "plugins": { },
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- default
{- "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"
}
创建全局规则
Authorizations:
query Parameters
gateway_group_id required | string >= 1 |
Request Body schema: application/json
plugins required | object 键值对,用于表示与目标对象关联的插件。 |
Responses
Request samples
- Payload
{- "plugins": { }
}
Response samples
- 200
- 400
- default
{- "value": {
- "plugins": { },
- "id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
获取所有全局规则
Authorizations:
query Parameters
gateway_group_id required | string >= 1 |
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 搜索关键字 |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "plugins": { },
- "id": "string",
- "created_at": 0,
- "updated_at": 0
}
], - "total": 0
}
获取特定全局规则
Authorizations:
path Parameters
global_rule_id required | string^[a-zA-Z0-9-_.]+$ 全局规则 ID |
query Parameters
gateway_group_id required | string >= 1 |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "plugins": { },
- "id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
更新特定全局规则
Authorizations:
path Parameters
global_rule_id required | string^[a-zA-Z0-9-_.]+$ 全局规则 ID |
query Parameters
gateway_group_id required | string >= 1 |
Request Body schema: application/json
plugins required | object 键值对,用于表示与目标对象关联的插件。 |
Responses
Request samples
- Payload
{- "plugins": { }
}
Response samples
- 200
- 400
- default
{- "value": {
- "plugins": { },
- "id": "string",
- "created_at": 0,
- "updated_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
更新插件元数据
Authorizations:
path Parameters
plugin_name required | string [ 1 .. 64 ] characters |
query Parameters
gateway_group_id required | string >= 1 |
Request Body schema: application/json
插件元数据的描述信息
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
获取所有网关实例
Authorizations:
query Parameters
gateway_group_id | string >= 1 |
order_by | string Default: "last_heartbeat_time" Enum: "created_at" "last_heartbeat_time" |
status | string Enum: "Healthy" "OutOfSync" "LostConnection" "Offline" 网关实例状态 |
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
page | integer <int64> >= 1 页码,从 1 开始。 |
search | string 搜索关键字 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "id": "string",
- "hostname": "string",
- "ip": "string",
- "gateway_group_id": "string",
- "version": "string",
- "ports": [
- 0
], - "last_heartbeat_time": 0,
- "to_be_deleted_at": 0,
- "created_at": 0,
- "dataplane_certificate_expire_time": 0,
- "status": "Healthy",
- "cores": 0
}
], - "total": 0
}
为特定网关组的网关实例创建令牌
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
query Parameters
only_token | boolean 响应只包含令牌字符串,不包含编码的 JWT 令牌。 |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string",
- "token_plain_text": "string"
}, - "key": "string",
- "warning_msg": "string"
}
获取所有用户
Authorizations:
query Parameters
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 |
login_option_name | Array of strings >= 1 |
Responses
Response samples
- 200
- default
{- "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
}
获取特定用户
Authorizations:
path Parameters
user_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 用户 ID |
Responses
Response samples
- 200
- default
{- "value": {
- "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"
}
]
}
]
}, - "key": "string",
- "warning_msg": "string"
}
将密码重置为默认值
Authorizations:
path Parameters
user_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 用户 ID |
Request Body schema: application/json
password required | string [ 1 .. 128 ] characters 用户密码 |
Responses
Request samples
- Payload
{- "password": "string"
}
Response samples
- 200
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
Response samples
- 200
- default
{- "value": {
- "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"
}
]
}
]
}, - "key": "string",
- "warning_msg": "string"
}
更新用户
Authorizations:
Request Body schema: application/json
first_name required | string [ 1 .. 150 ] characters |
last_name required | string [ 1 .. 150 ] characters |
Responses
Request samples
- Payload
{- "first_name": "string",
- "last_name": "string"
}
Response samples
- 200
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
邀请用户
Authorizations:
Request Body schema: application/json
username required | string [ 1 .. 128 ] characters 用户名 |
password required | string [ 1 .. 128 ] characters 用户密码 |
Responses
Request samples
- Payload
{- "username": "string",
- "password": "string"
}
Response samples
- 200
- default
{- "value": {
- "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"
}
]
}
], - "invitation_link": "string"
}, - "key": "string",
- "warning_msg": "string"
}
更新用户密码
Authorizations:
Request Body schema: application/json
old_password | string [ 1 .. 128 ] characters |
new_password required | string [ 1 .. 128 ] characters |
Responses
Request samples
- Payload
{- "old_password": "string",
- "new_password": "string"
}
Response samples
- 200
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
使用用户名和密码登录 API7 控制台
Authorizations:
Request Body schema: application/json
username required | string [ 1 .. 128 ] characters 用户名 |
password required | string [ 1 .. 128 ] characters 用户密码 |
Responses
Request samples
- Payload
{- "username": "string",
- "password": "string"
}
Response samples
- 200
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
更新特定用户的指定角色
Authorizations:
path Parameters
user_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 用户 ID |
Request Body schema: application/json
Array of objects [ 1 .. 32 ] items | |||||
Array ([ 1 .. 32 ] items)
|
Responses
Request samples
- Payload
{- "roles": [
- {
- "role_id": "string",
- "scopes": [
- "string"
]
}
]
}
Response samples
- 200
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
使用 LDAP 用户名和密码登录 API7 控制台
Authorizations:
path Parameters
login_option_id required | string |
Request Body schema: application/json
username required | string [ 1 .. 128 ] characters 登录用户的用户名 |
password required | string [ 1 .. 128 ] characters 登录用户的密码 |
Responses
Request samples
- Payload
{- "username": "string",
- "password": "string"
}
Response samples
- 200
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
获取所有角色
Authorizations:
query Parameters
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 搜索关键字 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "id": "string",
- "name": "string",
- "desc": "string",
- "org_id": "string",
- "type": "built_in",
- "scope_type": "gateway_group",
- "permissions": [
- "string"
]
}
], - "total": 0
}
Response samples
- 200
- default
{- "value": {
- "id": "string",
- "name": "string",
- "desc": "string",
- "org_id": "string",
- "type": "built_in",
- "scope_type": "gateway_group",
- "permissions": [
- "string"
]
}, - "key": "string",
- "warning_msg": "string"
}
从 Prometheus 获取数据
Authorizations:
path Parameters
prometheus_path required | string Example: api/v1/query_range?query=xxx&start=1684722195&end=1684723995&step=15 指向 Prometheus API 的路径。 |
Responses
Response samples
- 200
- default
{- "value": {
- "status": "success",
- "data": {
- "resultType": "matrix",
- "result": [
- {
- "metric": {
- "label": "xxx"
}, - "values": [
- [
- 1684740675,
- 1
], - [
- 1684740690,
- 2
]
]
}
]
}
}, - "key": "string",
- "warning_msg": "string"
}
从 Prometheus 获取打上 POST 标签的数据
Authorizations:
path Parameters
prometheus_path required | string Example: api/v1/query_range?query=xxx&start=1684722195&end=1684723995&step=15 指向 Prometheus API 的路径。 |
Request Body schema: application/x-www-form-urlencoded
property name* additional property | any |
Responses
Response samples
- 200
- default
{- "value": {
- "status": "success",
- "data": {
- "resultType": "matrix",
- "result": [
- {
- "metric": {
- "label": "xxx"
}, - "values": [
- [
- 1684740675,
- 1
], - [
- 1684740690,
- 2
]
]
}
]
}
}, - "key": "string",
- "warning_msg": "string"
}
向数据平面发送心跳探查
Authorizations:
Request Body schema: application/json
instance_id required | string^[a-zA-Z0-9-_.]+$ 网关实例 ID |
hostname required | string 网关实例的主机名 |
ip required | string 网关实例的 IP 地址 |
version required | string 网关实例的版本 |
ports required | Array of integers non-empty unique 网关实例的监听端口 |
conf_server_revision required | string 数据平面当前使用的配置版本 |
cores | integer DP 内核的数量 |
Responses
Request samples
- Payload
{- "instance_id": "string",
- "hostname": "string",
- "ip": "string",
- "version": "string",
- "ports": [
- 0
], - "conf_server_revision": "string",
- "cores": 0
}
Response samples
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
生成数据平面指标
Authorizations:
Request Body schema: application/json
instance_id required | string^[a-zA-Z0-9-_.]+$ 网关实例 ID |
truncated | boolean 配置是否因超出单个报告大小限制而截断所报告的指标。 |
metrics required | string 以 Prometheus 指标格式呈现数据平面指标。 |
Responses
Request samples
- Payload
{- "instance_id": "string",
- "truncated": true,
- "metrics": "string"
}
Response samples
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
获取所有告警策略
Authorizations:
query Parameters
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
page | integer <int64> >= 1 页码,从 1 开始。 |
search | string 搜索关键字 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "id": "string",
- "trigger_logical_operator": "All",
- "trigger_conditions": [
- {
- "event": "number_of_status_code",
- "event_config": {
- "duration": 1,
- "unit": "hour",
- "http_status_code": "string"
}, - "operator": "larger_equal",
- "value": 0
}
], - "created_at": 0,
- "updated_at": 0,
- "name": "string",
- "desc": "string",
- "scope": [
- "string"
], - "enable": false,
- "title": "string",
- "detail": "string",
- "check_interval": 60,
- "severity": "high",
- "webhook_templates": [
- "string"
]
}
], - "total": 0
}
创建告警策略
Authorizations:
Request Body schema: application/json
name required | string 告警策略名称 |
desc | string [ 1 .. 1024 ] characters 告警策略的描述信息 |
severity | string Default: "medium" Enum: "high" "medium" "low" 告警的严重级别 |
scope required | Array of strings non-empty |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "severity": "high",
- "scope": [
- "string"
]
}
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string"
}, - "key": "string",
- "warning_msg": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string",
- "trigger_logical_operator": "All",
- "trigger_conditions": [
- {
- "event": "number_of_status_code",
- "event_config": {
- "duration": 1,
- "unit": "hour",
- "http_status_code": "string"
}, - "operator": "larger_equal",
- "value": 0
}
], - "created_at": 0,
- "updated_at": 0,
- "name": "string",
- "desc": "string",
- "scope": [
- "string"
], - "enable": false,
- "title": "string",
- "detail": "string",
- "check_interval": 60,
- "severity": "high",
- "webhook_templates": [
- "string"
]
}, - "key": "string",
- "warning_msg": "string"
}
更新特定告警策略
Authorizations:
path Parameters
alert_policy_id required | string |
Request Body schema: application/json
name | string 告警策略名称 |
desc | string [ 1 .. 1024 ] characters 告警策略的描述信息 |
scope | Array of strings non-empty |
enable | boolean Default: false 配置是否启用告警策略。 |
title | string [ 1 .. 128 ] characters 告警策略标题 |
detail | string [ 1 .. 128 ] characters 告警策略的详细信息 |
check_interval | integer [ 60 .. 86400 ] 告警策略的检查周期(单位:秒) |
severity | string Default: "medium" Enum: "high" "medium" "low" 告警的严重级别 |
webhook_templates | Array of strings [ 0 .. 10 ] items 告警 Webhook 模版钩子 |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "scope": [
- "string"
], - "enable": false,
- "title": "string",
- "detail": "string",
- "check_interval": 60,
- "severity": "high",
- "webhook_templates": [
- "string"
]
}
Response samples
- 200
- 400
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
更新特定告警策略
Authorizations:
path Parameters
alert_policy_id required | string |
Request Body schema: application/json
name | string 告警策略名称 |
desc | string [ 1 .. 1024 ] characters 告警策略的描述信息 |
scope | Array of strings non-empty |
enable | boolean Default: false 配置是否启用告警策略。 |
title | string [ 1 .. 128 ] characters 告警策略标题 |
detail | string [ 1 .. 128 ] characters 告警策略的详细信息 |
check_interval | integer [ 60 .. 86400 ] 告警策略的检查周期(单位:秒) |
severity | string Default: "medium" Enum: "high" "medium" "low" 告警的严重级别 |
webhook_templates | Array of strings [ 0 .. 10 ] items 告警 Webhook 模版钩子 |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "scope": [
- "string"
], - "enable": false,
- "title": "string",
- "detail": "string",
- "check_interval": 60,
- "severity": "high",
- "webhook_templates": [
- "string"
]
}
Response samples
- 200
- 400
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
更新特定告警策略的触发条件
Authorizations:
path Parameters
alert_policy_id required | string |
Request Body schema: application/json
trigger_logical_operator | string Enum: "All" "Any" |
Array of objects or objects or objects [ 1 .. 64 ] items |
Responses
Request samples
- Payload
{- "trigger_logical_operator": "All",
- "trigger_conditions": [
- {
- "event": "number_of_status_code",
- "event_config": {
- "duration": 1,
- "unit": "hour",
- "http_status_code": "string"
}, - "operator": "larger_equal",
- "value": 0
}
]
}
Response samples
- 200
- 400
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
获取所有告警 Webhook 模版
Authorizations:
query Parameters
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
page | integer <int64> >= 1 页码,从 1 开始。 |
search | string 搜索关键字 |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "id": "string",
- "updated_at": 0,
- "created_at": 0,
- "name": "string",
- "desc": "string",
- "url": "string",
- "method": "POST",
- "skip_tls_verify": false,
- "headers": [
- {
- "name": "string",
- "value": "string"
}
], - "template": "string"
}
], - "total": 0
}
创建告警 Webhook 模版
Authorizations:
Request Body schema: application/json
name required | string [ 1 .. 20 ] characters |
desc | string [ 0 .. 255 ] characters |
url required | string [ 1 .. 1024 ] characters Webhook URL |
method | string Default: "POST" Value: "POST" Webhook 请求的 HTTP 方法 |
skip_tls_verify required | boolean Default: false 配置是否跳过 TLS 验证。 |
Array of objects [ 1 .. 16 ] items 配置发送请求时需要使用的其他 HTTP 标头。 | |
template required | string 告警信息模版,支持使用 Go 语法结构。 |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "url": "string",
- "method": "POST",
- "skip_tls_verify": false,
- "headers": [
- {
- "name": "string",
- "value": "string"
}
], - "template": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string"
}, - "key": "string",
- "warning_msg": "string"
}
获取特定告警 Webhook 模版
Authorizations:
path Parameters
webhook_template_id required | string |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string",
- "updated_at": 0,
- "created_at": 0,
- "name": "string",
- "desc": "string",
- "url": "string",
- "method": "POST",
- "skip_tls_verify": false,
- "headers": [
- {
- "name": "string",
- "value": "string"
}
], - "template": "string"
}, - "key": "string",
- "warning_msg": "string"
}
更新特定告警 Webhook 模版
Authorizations:
path Parameters
webhook_template_id required | string |
Request Body schema: application/json
name required | string [ 1 .. 20 ] characters |
desc | string [ 0 .. 255 ] characters |
url required | string [ 1 .. 1024 ] characters Webhook URL |
method | string Default: "POST" Value: "POST" Webhook 请求的 HTTP 方法 |
skip_tls_verify required | boolean Default: false 配置是否跳过 TLS 验证。 |
Array of objects [ 1 .. 16 ] items 配置发送请求时需要使用的其他 HTTP 标头。 | |
template required | string 告警信息模版,支持使用 Go 语法结构。 |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "url": "string",
- "method": "POST",
- "skip_tls_verify": false,
- "headers": [
- {
- "name": "string",
- "value": "string"
}
], - "template": "string"
}
Response samples
- 200
- 400
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
获取所有告警 Webhook 模版钩子
Authorizations:
path Parameters
webhook_template_id required | string |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "id": "string",
- "trigger_logical_operator": "All",
- "trigger_conditions": [
- {
- "event": "number_of_status_code",
- "event_config": {
- "duration": 1,
- "unit": "hour",
- "http_status_code": "string"
}, - "operator": "larger_equal",
- "value": 0
}
], - "created_at": 0,
- "updated_at": 0,
- "name": "string",
- "desc": "string",
- "scope": [
- "string"
], - "enable": false,
- "title": "string",
- "detail": "string",
- "check_interval": 60,
- "severity": "high",
- "webhook_templates": [
- "string"
]
}
], - "total": 0
}
获取所有告警历史
Authorizations:
query Parameters
order_by | string Default: "updated_at" Enum: "created_at" "updated_at" |
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
page | integer <int64> >= 1 页码,从 1 开始。 |
search | string 搜索关键字 |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "id": "string",
- "alert_policy_id": "string",
- "alert_webhook_template_id": "string",
- "gateway_group_id": "string",
- "alert_webhook_template_name": "string",
- "alert_policy_name": "string",
- "severity": "high",
- "desc": "string",
- "created_at": 0,
- "status": 0,
- "http_request": "string",
- "http_response": "string"
}
], - "total": 0
}
获取所有审计日志
Authorizations:
query Parameters
event_type | string |
operator_id | string 操作员的用户 ID |
resource_id | string |
start_at | integer |
end_at | integer |
order_by | string Default: "event_time" Value: "event_time" |
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
page | integer <int64> >= 1 页码,从 1 开始。 |
Responses
Response samples
- 200
{- "list": [
- {
- "id": "string",
- "event_time": 0,
- "operator": {
- "id": "string",
- "email": "string",
- "last_name": "string",
- "first_name": "string",
- "username": "string"
}, - "source": "dashboard",
- "token_name": "string",
- "event_type": "string",
- "resource_id": "string",
- "ip_address": "string",
- "error_message": "string",
- "http_request": {
- "method": "string",
- "uri": "string",
- "body": { },
- "user_agent": "string"
}, - "http_response": {
- "status_code": 0,
- "body": { }
}
}
], - "total": 0
}
创建令牌
Authorizations:
Request Body schema: application/json
name required | string <= 40 characters 令牌名称 |
expires_at required | integer <int64> 令牌的到期时间 |
Responses
Request samples
- Payload
{- "name": "string",
- "expires_at": 0
}
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string",
- "name": "string",
- "created_at": 0,
- "updated_at": 0,
- "expires_at": 0,
- "user_id": "string",
- "user_name": "string",
- "last_used_at": 0,
- "token": "string"
}, - "key": "string",
- "warning_msg": "string"
}
获取所有令牌
Authorizations:
query Parameters
order_by | string Default: "created_at" Enum: "created_at" "updated_at" "expires_at" |
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
page | integer <int64> >= 1 页码,从 1 开始。 |
search | string 搜索关键字 |
Responses
Response samples
- 200
- 400
- default
{- "list": [
- {
- "id": "string",
- "name": "string",
- "created_at": 0,
- "updated_at": 0,
- "expires_at": 0,
- "user_id": "string",
- "user_name": "string",
- "last_used_at": 0
}
], - "total": 0
}
获取特定令牌
Authorizations:
path Parameters
token_id required | string^[a-zA-Z0-9-_.]+$ 令牌 ID |
Responses
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string",
- "name": "string",
- "created_at": 0,
- "updated_at": 0,
- "expires_at": 0,
- "user_id": "string",
- "user_name": "string",
- "last_used_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
更新特定令牌
Authorizations:
path Parameters
token_id required | string^[a-zA-Z0-9-_.]+$ 令牌 ID |
Request Body schema: application/json
name required | string <= 40 characters 令牌名称 |
Responses
Request samples
- Payload
{- "name": "string"
}
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string",
- "name": "string",
- "created_at": 0,
- "updated_at": 0,
- "expires_at": 0,
- "user_id": "string",
- "user_name": "string",
- "last_used_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
重新生成令牌
Authorizations:
path Parameters
token_id required | string^[a-zA-Z0-9-_.]+$ 令牌 ID |
Request Body schema: application/json
expires_at required | integer <int64> 令牌的到期时间 |
Responses
Request samples
- Payload
{- "expires_at": 0
}
Response samples
- 200
- 400
- default
{- "value": {
- "id": "string",
- "name": "string",
- "created_at": 0,
- "updated_at": 0,
- "expires_at": 0,
- "user_id": "string",
- "user_name": "string",
- "last_used_at": 0,
- "token": "string"
}, - "key": "string",
- "warning_msg": "string"
}
获取所有网关组
Authorizations:
query Parameters
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" |
search | string 搜索关键字 |
object non-empty | |
is_permitted | boolean Default: false 筛选当前用户有操作权限的资源。 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "id": "string",
- "name": "string",
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 0,
- "updated_at": 0,
- "config": {
- "group_type": "API7EE_GATEWAY_3.2",
- "control_plane_key_prefix": "string",
- "control_plane_user": "string",
- "control_plane_password": "string",
- "image_tag": "string"
}
}
], - "total": 0
}
创建网关组
Authorizations:
Request Body schema: application/json
name required | string [ 1 .. 1024 ] characters 对象名称 |
desc | string |
object |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- default
{- "value": {
- "id": "string",
- "name": "string",
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 0,
- "updated_at": 0,
- "config": {
- "group_type": "API7EE_GATEWAY_3.2",
- "control_plane_key_prefix": "string",
- "control_plane_user": "string",
- "control_plane_password": "string",
- "image_tag": "string"
}
}, - "key": "string",
- "warning_msg": "string"
}
统计网关组的资源
Authorizations:
path Parameters
resource_type required | string Enum: "ssl" "consumer" "gateway_instance" |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "id": "string",
- "name": "string",
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 0,
- "updated_at": 0,
- "config": {
- "group_type": "API7EE_GATEWAY_3.2",
- "control_plane_key_prefix": "string",
- "control_plane_user": "string",
- "control_plane_password": "string",
- "image_tag": "string"
}, - "count": 0
}
], - "total": 0
}
更新特定网关组
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
Request Body schema: application/json
name required | string [ 1 .. 1024 ] characters 对象名称 |
desc | string |
object |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- default
{- "value": {
- "id": "string",
- "name": "string",
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 0,
- "updated_at": 0,
- "config": {
- "group_type": "API7EE_GATEWAY_3.2",
- "control_plane_key_prefix": "string",
- "control_plane_user": "string",
- "control_plane_password": "string",
- "image_tag": "string"
}
}, - "key": "string",
- "warning_msg": "string"
}
获取特定网关组
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
Responses
Response samples
- 200
- default
{- "value": {
- "id": "string",
- "name": "string",
- "desc": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 0,
- "updated_at": 0,
- "config": {
- "group_type": "API7EE_GATEWAY_3.2",
- "control_plane_key_prefix": "string",
- "control_plane_user": "string",
- "control_plane_password": "string",
- "image_tag": "string"
}
}, - "key": "string",
- "warning_msg": "string"
}
获取特定网关组的所有已发布服务
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
query Parameters
runtime_type | string Enum: "normal" "canary" |
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" "publish_time" |
search | string 搜索关键字 |
Responses
Response samples
- 200
- default
{- "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
}
获取特定网关组的已发布服务
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
Responses
Response samples
- 200
- default
{- "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",
- "service_id": "string",
- "version": "string",
- "created_at": 0,
- "gateway_group_name": "string",
- "gateway_group_id": "string",
- "status": 0
}, - "key": "string",
- "warning_msg": "string"
}
删除特定网关组的已发布服务
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
Responses
Response samples
- 200
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
获取特定网关组所有已发布服务的版本
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
query Parameters
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
order_by | string Default: "publish_time" Value: "publish_time" |
Responses
Response samples
- 200
- default
{- "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,
- "publish_time": "string"
}
], - "total": 0
}
获取特定网关组所有的服务运行时配置
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
Responses
Response samples
- 200
- default
{- "value": {
- "hosts": [
- "string"
], - "path_prefix": "string",
- "upstreams": {
- "name": "default",
- "desc": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}
}, - "status": 0,
- "plugins": { }
}, - "key": "string",
- "warning_msg": "string"
}
更新特定网关组的服务运行时配置
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
query Parameters
dry-run | string Value: "all" 配置是否在试运行模式下进行操作。 |
Request Body schema: application/json
non-emptyhosts | Array of strings [ 1 .. 32 ] items unique 服务的 HTTP 主机,用于接收传入的请求。 |
path_prefix | string [ 1 .. 4096 ] characters ^/ 服务的监听路径前缀 |
object | |
status | integer Enum: 0 1 对象状态。0 表示对象处于活动状态。1 表示对象处于非活动状态。 |
plugins | object 键值对,用于表示与目标对象关联的插件。 |
Responses
Request samples
- Payload
{- "hosts": [
- "string"
], - "path_prefix": "string",
- "upstreams": {
- "name": "default",
- "desc": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}
}, - "status": 0,
- "plugins": { }
}
Response samples
- 200
- default
{- "value": {
- "hosts": [
- "string"
], - "path_prefix": "string",
- "upstreams": {
- "name": "default",
- "desc": "string",
- "nodes": [
- {
- "host": "string",
- "port": 1,
- "weight": 65535,
- "priority": 0
}
], - "service_name": "string",
- "discovery_type": "kubernetes",
- "discovery_args": {
- "metadata": {
- "idc": "shanghai"
}
}
}, - "status": 0,
- "plugins": { }
}, - "key": "string",
- "warning_msg": "string"
}
获取特定网关组的所有授权用户
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
query Parameters
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 |
Responses
Response samples
- 200
- default
{- "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
}
签发数据平面证书
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
Responses
Response samples
- 200
- default
{- "value": {
- "id": "string",
- "certificate": "string",
- "private_key": "string",
- "expiry": 0
}, - "key": "string",
- "warning_msg": "string"
}
获取所有服务注册中心
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
query Parameters
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_connect_time" |
search | string 搜索关键字 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "name": "string",
- "desc": "string",
- "health_check": {
- "probe_interval": 15,
- "probe_timeout": 5
}, - "type": "kubernetes",
- "kubernetes_config": {
- "service": {
- "schema": "http",
- "host": "string",
- "port": "6443"
}, - "namespace_selector": {
- "equal": "string",
- "not_equal": "string",
- "match": [
- "string"
], - "not_match": [
- "string"
]
}, - "label_selector": "string",
- "client": {
- "token_file": "string"
}
}, - "id": "string",
- "gateway_group_id": "string",
- "created_at": 0,
- "updated_at": 0,
- "status": "healthy",
- "last_connect_time": 0,
- "associated_services_count": 0
}
], - "total": 0
}
创建服务注册中心
Authorizations:
path Parameters
gateway_group_id required | string >= 1 Example: 86fb9981-d9d2-4555-9df8-91ae92129335 |
Request Body schema: application/json
name | string [ 1 .. 1024 ] characters 对象名称 |
desc | string |
object | |
type required | string Value: "kubernetes" Kubernetes 服务类型 |
required | object |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "health_check": {
- "probe_interval": 15,
- "probe_timeout": 5
}, - "type": "nacos",
- "nacos_config": {
- "hosts": [
- "string"
], - "prefix": "/nacos/v1",
- "default_weight": 100,
- "fetch_interval": 30,
- "timeout": {
- "connect": 2,
- "send": 2,
- "read": 5
}, - "auth": {
- "username": "string",
- "password": "string"
}
}
}
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "desc": "string",
- "health_check": {
- "probe_interval": 15,
- "probe_timeout": 5
}, - "type": "kubernetes",
- "kubernetes_config": {
- "service": {
- "schema": "http",
- "host": "string",
- "port": "6443"
}, - "namespace_selector": {
- "equal": "string",
- "not_equal": "string",
- "match": [
- "string"
], - "not_match": [
- "string"
]
}, - "label_selector": "string",
- "client": {
- "token_file": "string"
}
}, - "id": "string",
- "gateway_group_id": "string",
- "created_at": 0,
- "updated_at": 0,
- "status": "healthy",
- "last_connect_time": 0
}, - "key": "string",
- "warning_msg": "string"
}
获取特定服务注册中心的详细信息
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 |
Responses
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "desc": "string",
- "health_check": {
- "probe_interval": 15,
- "probe_timeout": 5
}, - "type": "kubernetes",
- "kubernetes_config": {
- "service": {
- "schema": "http",
- "host": "string",
- "port": "6443"
}, - "namespace_selector": {
- "equal": "string",
- "not_equal": "string",
- "match": [
- "string"
], - "not_match": [
- "string"
]
}, - "label_selector": "string",
- "client": {
- "token_file": "string"
}
}, - "id": "string",
- "gateway_group_id": "string",
- "created_at": 0,
- "updated_at": 0,
- "status": "healthy",
- "last_connect_time": 0
}, - "key": "string",
- "warning_msg": "string"
}
更新特定服务注册中心
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 |
Request Body schema: application/json
name | string [ 1 .. 1024 ] characters 对象名称 |
desc | string |
object | |
type required | string Value: "kubernetes" Kubernetes 服务类型 |
required | object |
Responses
Request samples
- Payload
{- "name": "string",
- "desc": "string",
- "health_check": {
- "probe_interval": 15,
- "probe_timeout": 5
}, - "type": "nacos",
- "nacos_config": {
- "hosts": [
- "string"
], - "prefix": "/nacos/v1",
- "default_weight": 100,
- "fetch_interval": 30,
- "timeout": {
- "connect": 2,
- "send": 2,
- "read": 5
}, - "auth": {
- "username": "string",
- "password": "string"
}
}
}
Response samples
- 200
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
删除特定服务注册中心
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 |
Responses
Response samples
- 200
- default
{- "value": { },
- "key": "string",
- "warning_msg": "string"
}
获取特定服务注册中心关联的所有服务
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 页码,从 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" "publish_time" |
Responses
Response samples
- 200
- default
{- "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
}
获取特定(Kubernetes)服务注册中心的所有内部服务
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 |
Responses
Response samples
- 200
- default
{- "value": {
- "type": "kubernetes",
- "internal_services": {
- "default": [
- "service1",
- "service2"
], - "kube-system": [
- "kube-dns"
]
}
}, - "key": "string",
- "warning_msg": "string"
}
获取所有 Nacos 命名空间
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 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "namespace": "string",
- "namespace_show_name": "string"
}
], - "total": 0
}
获取特定 Nacos 命名空间下的所有组
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 |
nacos_namespace required | string >= 1 Example: public |
Responses
Response samples
- 200
- default
{- "list": [
- "string"
], - "total": 0
}
获取特定 Nacos 组内的所有服务
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 |
nacos_namespace required | string >= 1 Example: public |
nacos_group required | string >= 1 Example: DEFAULT_GROUP |
Responses
Response samples
- 200
- default
{- "list": [
- "string"
], - "total": 0
}
获取所有 Nacos 实例元数据
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 |
nacos_namespace required | string >= 1 Example: public |
nacos_group required | string >= 1 Example: DEFAULT_GROUP |
nacos_service required | string >= 1 Example: api7ee3-keycloak |
Responses
Response samples
- 200
- default
{- "list": [
- { }
], - "total": 0,
- "value": {
- "idc": [
- "beijing",
- "shanghai"
]
}
}
获取特定服务注册中心的健康检查历史记录
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 页码,从 1 开始。 |
page_size | integer <int64> >= 1 页面大小,必须大于 0。 |
direction | string Default: "desc" Enum: "asc" "desc" 按升序或降序排列(不区分大小写)。默认情况下,按降序排列。 |
order_by | string Default: "connect_time" Value: "connect_time" |
status | Array of strings Items Enum: "healthy" "lost_connection" |
search | string 搜索关键字 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "instance_id": "string",
- "service_registry_id": "string",
- "hostname": "string",
- "status": "healthy",
- "connect_time": 0
}
], - "total": 0
}
获取所有服务版本
Authorizations:
path Parameters
service_version_id required | string^[a-zA-Z0-9-_.]+$ 服务版本 ID |
Responses
Response samples
- 200
- default
{- "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",
- "service_id": "string",
- "version": "string",
- "created_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
获取所有路由的服务版本
Authorizations:
path Parameters
service_version_id required | string^[a-zA-Z0-9-_.]+$ 服务版本 ID |
query Parameters
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" |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "id": "string",
- "route_id": "string",
- "service_version_id": "string"
}
], - "total": 0
}
获取特定路由的服务版本
Authorizations:
path Parameters
service_version_id required | string^[a-zA-Z0-9-_.]+$ 服务版本 ID |
route_version_id required | string^[a-zA-Z0-9-_.]+$ 路由版本 ID |
Responses
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "desc": "string",
- "methods": [
- "GET"
], - "paths": [
- "string"
], - "plugins": { },
- "enable_websocket": true,
- "id": "string",
- "route_id": "string",
- "service_version_id": "string"
}, - "key": "string",
- "warning_msg": "string"
}
获取服务版本名称
Authorizations:
path Parameters
service_id required | string^[a-zA-Z0-9-_.]+$ 服务 ID |
version required | string |
Responses
Response samples
- 200
- default
{- "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",
- "service_id": "string",
- "version": "string",
- "created_at": 0
}, - "key": "string",
- "warning_msg": "string"
}
更新系统设置
Authorizations:
Request Body schema: application/json
control_plane_address | Array of strings [ 0 .. 32 ] items unique |
Responses
Request samples
- Payload
{- "control_plane_address": [
- "string"
]
}
Response samples
- 200
- 400
- default
{- "value": {
- "control_plane_address": [
- "string"
]
}, - "key": "string",
- "warning_msg": "string"
}
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sp_acs_url": "string",
- "sp_slo_url": "string",
- "sp_metadata_url": "string",
- "sign_request": true,
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "property1": "email",
- "property2": "email"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}, - "key": "string",
- "warning_msg": "string"
}
更新特定登录选项
更新特定登录选项。
Authorizations:
path Parameters
login_option_id required | string |
Request Body schema: application/json
name required | string |
logo | string Base64 格式的图案标志 |
disable | boolean Default: false 是否禁用登录选项。 |
provider_type | string Enum: "ldap" "oidc" "saml" "cas" "built_in" 登录选项类型 |
object | |
object | |
object | |
object |
Responses
Request samples
- Payload
{- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sign_request": true,
- "private_key": "string",
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sp_acs_url": "string",
- "sp_slo_url": "string",
- "sp_metadata_url": "string",
- "sign_request": true,
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "property1": "email",
- "property2": "email"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}, - "key": "string",
- "warning_msg": "string"
}
更新特定登录选项
更新特定登录选项。
Authorizations:
path Parameters
login_option_id required | string |
Request Body schema: application/json
name required | string |
logo | string Base64 格式的图案标志 |
disable | boolean Default: false 是否禁用登录选项。 |
provider_type | string Enum: "ldap" "oidc" "saml" "cas" "built_in" 登录选项类型 |
object | |
object | |
object | |
object |
Responses
Request samples
- Payload
{- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sign_request": true,
- "private_key": "string",
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}
Response samples
- 200
- default
{- "value": {
- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sp_acs_url": "string",
- "sp_slo_url": "string",
- "sp_metadata_url": "string",
- "sign_request": true,
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "property1": "email",
- "property2": "email"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}, - "key": "string",
- "warning_msg": "string"
}
获取所有登陆选项
获取所有登陆选项。
Authorizations:
query Parameters
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 搜索关键字 |
name | string 资源的名称 |
Responses
Response samples
- 200
- default
{- "list": [
- {
- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sp_acs_url": "string",
- "sp_slo_url": "string",
- "sp_metadata_url": "string",
- "sign_request": true,
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "property1": "email",
- "property2": "email"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}
], - "total": 0
}
创建登录选项
创建登录选项。
Authorizations:
Request Body schema: application/json
name required | string |
logo | string Base64 格式的图案标志 |
disable | boolean Default: false 是否禁用登录选项。 |
provider_type | string Enum: "ldap" "oidc" "saml" "cas" "built_in" 登录选项类型 |
object | |
object | |
object | |
object |
Responses
Request samples
- Payload
{- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sign_request": true,
- "private_key": "string",
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}
Response samples
- 200
- default
{- "list": [
- {
- "name": "string",
- "logo": "string",
- "disable": false,
- "provider_type": "ldap",
- "oidc_config": {
- "client_id": "string",
- "client_secret": "string",
- "issuer": "string",
- "request_scopes": [
- "openid",
- "email",
- "profile"
], - "ssl_verify": true,
}, - "saml_config": {
- "idp_metadata_url": "string",
- "sp_root_url": "string",
- "sp_acs_url": "string",
- "sp_slo_url": "string",
- "sp_metadata_url": "string",
- "sign_request": true,
- "certificate": "string",
- "entity_id": "string",
- "attributes": {
- "property1": "email",
- "property2": "email"
}
}, - "ldap_config": {
- "host": "string",
- "port": "string",
- "base_dn": "string",
- "bind_dn": "string",
- "bind_password": "string",
- "identifier": "cn",
- "attributes": {
- "email": "string",
- "property1": "string",
- "property2": "string"
}, - "timeout": 10,
- "use_ssl": false,
- "ssl_verify": true,
- "root_ca_cert": "string",
- "client_cert": "string",
- "client_key": "string"
}, - "cas_config": {
- "url": "string",
- "send_service": true,
- "ssl_verify": true
}
}
], - "total": 0
}