跳到主要内容

API7 企业版 Admin API 参考文档 (0.11.0)

Download OpenAPI specification:Download

使用 API7 企业版 Admin API 创建和管理 API7 资源。

服务

创建服务

Authorizations:
tokenNone
Request Body schema: application/json
non-empty
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

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "plugins": { },
  • "upstream": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定服务

Authorizations:
tokenNone
path Parameters
service_id
required
string^[a-zA-Z0-9-_.]+$

服务 ID

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定服务

Authorizations:
tokenNone
path Parameters
service_id
required
string^[a-zA-Z0-9-_.]+$

服务 ID

Request Body schema: application/json
non-empty
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

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "plugins": { },
  • "upstream": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定服务

Authorizations:
tokenNone
path Parameters
service_id
required
string^[a-zA-Z0-9-_.]+$

服务 ID

query Parameters
dry-run
string
Value: "all"

配置是否在试运行模式下进行操作。

Request Body schema: application/json
non-empty
name
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

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "plugins": { },
  • "upstream": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定服务

Authorizations:
tokenNone
path Parameters
service_id
required
string^[a-zA-Z0-9-_.]+$

服务 ID

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

发布服务

Authorizations:
tokenNone
Request Body schema: application/json
non-empty
create_new_version
boolean

配置是否为更新的服务创建新的服务版本。

gateway_group_id
string^[a-zA-Z0-9-_.]+$

对象 ID

Array of objects non-empty [ items non-empty ]

Responses

Request samples

Content type
application/json
{
  • "create_new_version": true,
  • "gateway_group_id": "string",
  • "services": [
    ]
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

检查服务冲突

Authorizations:
tokenNone
Request Body schema: application/json
non-empty
create_new_version
boolean

配置是否为更新的服务创建新的服务版本。

gateway_group_id
string^[-_a-zA-Z0-9]+$

对象 ID

Array of objects non-empty

Responses

Request samples

Content type
application/json
{
  • "create_new_version": true,
  • "gateway_group_id": "string",
  • "services": [
    ]
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有授权用户

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定的已发布服务

Authorizations:
tokenNone
path Parameters
service_id
required
string^[a-zA-Z0-9-_.]+$

服务 ID

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Secret

获取所有 Secret

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定 Secret

Authorizations:
tokenNone
path Parameters
secret_manager
required
string
Value: "vault"
secret_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

创建或更新特定 Secret

Authorizations:
tokenNone
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

Content type
application/json
{
  • "uri": "string",
  • "prefix": "string",
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定 Secret

Authorizations:
tokenNone
path Parameters
secret_manager
required
string
Value: "vault"
secret_id
required
string
query Parameters
gateway_group_id
required
string >= 1

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

OpenAPI

生成 OpenAPI 规范,导出服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "service_ids": [
    ],
  • "info": {
    },
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

基于 OpenAPI 规范导入服务

Authorizations:
tokenNone
Request Body schema: application/json
non-empty
Array 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

Content type
application/json
{
  • "routes": [
    ],
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "plugins": { },
  • "upstream": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

将 OpenAPI 规范转换为服务和路由资源

Authorizations:
tokenNone
Request Body schema: application/json
raw_openapi
required
string

原始 OpenAPI

Responses

Request samples

Content type
application/json
{
  • "raw_openapi": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

许可证

获取 API7 企业版许可证

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

导入或更新 API7 企业版许可证

Authorizations:
tokenNone
query Parameters
dry-run
string
Value: "all"

配置是否在试运行模式下进行操作。

Request Body schema: application/json
data
required
string

编码的许可证数据

Responses

Request samples

Content type
application/json
{
  • "data": "”xxxx1N-tNaTpttX-NjOdXjyg\""
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

路由

创建路由

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "methods": [
    ],
  • "paths": [
    ],
  • "plugins": { },
  • "enable_websocket": true,
  • "service_id": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有路由

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定路由

Authorizations:
tokenNone
path Parameters
route_id
required
string^[a-zA-Z0-9-_.]+$

路由 ID

query Parameters
object non-empty

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定路由

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "methods": [
    ],
  • "paths": [
    ],
  • "plugins": { },
  • "enable_websocket": true,
  • "service_id": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定路由

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "methods": [
    ],
  • "paths": [
    ],
  • "plugins": { },
  • "enable_websocket": true
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定路由

Authorizations:
tokenNone
path Parameters
route_id
required
string^[a-zA-Z0-9-_.]+$

路由 ID

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

SSL

创建 SSL 证书

Authorizations:
tokenNone
query Parameters
gateway_group_id
required
string >= 1
Request Body schema: application/json
One of
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

Content type
application/json
{
  • "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
  • "certs": [
    ],
  • "client": {
    },
  • "type": "server",
  • "labels": {
    },
  • "status": 0,
  • "key": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
  • "keys": [
    ]
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有 SSL 证书

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定 SSL 证书

Authorizations:
tokenNone
path Parameters
ssl_id
required
string^[a-zA-Z0-9-_.]+$

SSL 证书 ID

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定 SSL 证书

Authorizations:
tokenNone
path Parameters
ssl_id
required
string^[a-zA-Z0-9-_.]+$

SSL 证书 ID

query Parameters
gateway_group_id
string >= 1
Request Body schema: application/json
One of
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

Content type
application/json
{
  • "cert": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
  • "certs": [
    ],
  • "client": {
    },
  • "type": "server",
  • "labels": {
    },
  • "status": 0,
  • "key": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
  • "keys": [
    ]
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定 SSL 证书

Authorizations:
tokenNone
path Parameters
ssl_id
required
string^[a-zA-Z0-9-_.]+$

SSL 证书 ID

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

消费者

创建消费者

Authorizations:
tokenNone
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

Content type
application/json
{
  • "username": "string",
  • "plugins": { },
  • "desc": "string",
  • "labels": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有消费者

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定消费者

Authorizations:
tokenNone
path Parameters
consumer_id
required
string^[a-zA-Z0-9-_.]+$

消费者 ID

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定消费者

Authorizations:
tokenNone
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

Content type
application/json
{
  • "username": "string",
  • "plugins": { },
  • "desc": "string",
  • "labels": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定消费者

Authorizations:
tokenNone
path Parameters
consumer_id
required
string^[a-zA-Z0-9-_.]+$

消费者 ID

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定消费者

Authorizations:
tokenNone
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

Content type
application/json
{
  • "username": "string",
  • "plugins": { },
  • "desc": "string",
  • "labels": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

全局规则

创建全局规则

Authorizations:
tokenNone
query Parameters
gateway_group_id
required
string >= 1
Request Body schema: application/json
plugins
required
object

键值对,用于表示与目标对象关联的插件。

Responses

Request samples

Content type
application/json
{
  • "plugins": { }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有全局规则

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定全局规则

Authorizations:
tokenNone
path Parameters
global_rule_id
required
string^[a-zA-Z0-9-_.]+$

全局规则 ID

query Parameters
gateway_group_id
required
string >= 1

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定全局规则

Authorizations:
tokenNone
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

Content type
application/json
{
  • "plugins": { }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定全局规则

Authorizations:
tokenNone
path Parameters
global_rule_id
required
string^[a-zA-Z0-9-_.]+$

全局规则 ID

query Parameters
gateway_group_id
required
string >= 1

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

插件元数据

获取所有插件元数据

Authorizations:
tokenNone
path Parameters
plugin_name
required
string [ 1 .. 64 ] characters
query Parameters
gateway_group_id
required
string >= 1

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

更新插件元数据

Authorizations:
tokenNone
path Parameters
plugin_name
required
string [ 1 .. 64 ] characters
query Parameters
gateway_group_id
required
string >= 1
Request Body schema: application/json
object

插件元数据的描述信息

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

获取插件元数据的默认值

Authorizations:
tokenNone
path Parameters
plugin_name
required
string [ 1 .. 64 ] characters

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

插件

获取所有插件

Authorizations:
tokenNone
query Parameters
has_metadata
boolean
Default: false

表示是否过滤带有元数据的插件。

Responses

Response samples

Content type
application/json
[
  • "string"
]

获取所有插件的模式定义

Authorizations:
tokenNone
path Parameters
plugin_name
required
string [ 1 .. 64 ] characters
query Parameters
scope
string
Value: "all"

插件范围

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

根据插件名称和类型获取插件

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": [
    ],
  • "key": "string",
  • "warning_msg": "string"
}

变量

获取所有变量

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": [
    ],
  • "key": "string",
  • "warning_msg": "string"
}

网关实例

获取所有网关实例

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

统计不同状态下的网关实例数量

Authorizations:
tokenNone
path Parameters
field
required
string
Value: "status"
query Parameters
gateway_group_id
string >= 1
search
string

搜索关键字

Responses

Response samples

Content type
application/json
{
  • "value": [
    ],
  • "key": "string",
  • "warning_msg": "string"
}

获取所有网关实例内核

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

导出网关实例内核使用量

Authorizations:
tokenNone
query Parameters
begin_at
required
integer <int64>

网关实例内核使用量的起始时间

end_at
required
integer <int64>

网关实例内核使用量的截止时间

Responses

Response samples

Content type
application/json
{
  • "error_msg": "string"
}

为特定网关组的网关实例创建令牌

Authorizations:
tokenNone
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
query Parameters
only_token
boolean

响应只包含令牌字符串,不包含编码的 JWT 令牌。

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

用户

获取所有用户

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定用户

Authorizations:
tokenNone
path Parameters
user_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335

用户 ID

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定用户

Authorizations:
tokenNone
path Parameters
user_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335

用户 ID

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

将密码重置为默认值

Authorizations:
tokenNone
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

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

获取用户的详细信息

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新用户

Authorizations:
tokenNone
Request Body schema: application/json
first_name
required
string [ 1 .. 150 ] characters
last_name
required
string [ 1 .. 150 ] characters

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "last_name": "string"
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

邀请用户

Authorizations:
tokenNone
Request Body schema: application/json
username
required
string [ 1 .. 128 ] characters

用户名

password
required
string [ 1 .. 128 ] characters

用户密码

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新用户密码

Authorizations:
tokenNone
Request Body schema: application/json
old_password
string [ 1 .. 128 ] characters
new_password
required
string [ 1 .. 128 ] characters

Responses

Request samples

Content type
application/json
{
  • "old_password": "string",
  • "new_password": "string"
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用用户名和密码登录 API7 控制台

Authorizations:
tokenNone
Request Body schema: application/json
username
required
string [ 1 .. 128 ] characters

用户名

password
required
string [ 1 .. 128 ] characters

用户密码

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用用户名和密码退出 API7 控制台

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定用户的指定角色

Authorizations:
tokenNone
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)
role_id
required
string
scopes
Array of strings

角色有效性的范围,包含服务或网关组等资源的 ID。

Responses

Request samples

Content type
application/json
{
  • "roles": [
    ]
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用 OIDC (OpenID Connect) 协议登录 API7 控制台

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用 OIDC (OpenID Connect) 协议退出 API7 控制台

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

从身份服务器回滚 API

Authorizations:
tokenNone
query Parameters
state
required
string

OIDC 协议字段

code
required
string

OIDC 协议字段

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用 LDAP 用户名和密码登录 API7 控制台

Authorizations:
tokenNone
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

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用 LDAP 用户名和密码退出 API7 控制台

Authorizations:
tokenNone
path Parameters
login_option_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用 OIDC Provider 登录 API7 控制台

Authorizations:
tokenNone
path Parameters
login_option_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

使用 OIDC Provider 退出 API7 控制台

Authorizations:
tokenNone
path Parameters
login_option_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

RBAC

获取所有角色

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定角色的详细信息

Authorizations:
tokenNone
path Parameters
role_id
required
string >= 1

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有权限

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Prometheus Proxy

从 Prometheus 获取数据

Authorizations:
tokenNone
path Parameters
prometheus_path
required
string
Example: api/v1/query_range?query=xxx&start=1684722195&end=1684723995&step=15

指向 Prometheus API 的路径。

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

从 Prometheus 获取打上 POST 标签的数据

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

数据平面心跳

向数据平面发送心跳探查

Authorizations:
tokenNone
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

Content type
application/json
{
  • "instance_id": "string",
  • "hostname": "string",
  • "ip": "string",
  • "version": "string",
  • "ports": [
    ],
  • "conf_server_revision": "string",
  • "cores": 0
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

数据平面指标

生成数据平面指标

Authorizations:
tokenNone
Request Body schema: application/json
instance_id
required
string^[a-zA-Z0-9-_.]+$

网关实例 ID

truncated
boolean

配置是否因超出单个报告大小限制而截断所报告的指标。

metrics
required
string

以 Prometheus 指标格式呈现数据平面指标。

Responses

Request samples

Content type
application/json
{
  • "instance_id": "string",
  • "truncated": true,
  • "metrics": "string"
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

告警策略

获取所有告警策略

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

创建告警策略

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "severity": "high",
  • "scope": [
    ]
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定告警策略

Authorizations:
tokenNone
path Parameters
alert_policy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定告警策略

Authorizations:
tokenNone
path Parameters
alert_policy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定告警策略

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "scope": [
    ],
  • "enable": false,
  • "title": "string",
  • "detail": "string",
  • "check_interval": 60,
  • "severity": "high",
  • "webhook_templates": [
    ]
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定告警策略

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "scope": [
    ],
  • "enable": false,
  • "title": "string",
  • "detail": "string",
  • "check_interval": 60,
  • "severity": "high",
  • "webhook_templates": [
    ]
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定告警策略的触发条件

Authorizations:
tokenNone
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

Content type
application/json
{
  • "trigger_logical_operator": "All",
  • "trigger_conditions": [
    ]
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

告警 Webhook 模版

获取所有告警 Webhook 模版

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

创建告警 Webhook 模版

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "url": "string",
  • "method": "POST",
  • "skip_tls_verify": false,
  • "headers": [
    ],
  • "template": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定告警 Webhook 模版

Authorizations:
tokenNone
path Parameters
webhook_template_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定告警 Webhook 模版

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "url": "string",
  • "method": "POST",
  • "skip_tls_verify": false,
  • "headers": [
    ],
  • "template": "string"
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定告警 Webhook 模版

Authorizations:
tokenNone
path Parameters
webhook_template_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有告警 Webhook 模版钩子

Authorizations:
tokenNone
path Parameters
webhook_template_id
required
string

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

告警历史

获取所有告警历史

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

审计日志

获取所有审计日志

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取审计日志的所有事件类型

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

导出所有审计日志

Authorizations:
tokenNone
query Parameters
event_type
string
operator_id
string

操作员的用户 ID

resource_id
string
start_at
integer
end_at
integer
format
required
string
Enum: "json" "csv"

Responses

令牌

创建令牌

Authorizations:
tokenNone
Request Body schema: application/json
name
required
string <= 40 characters

令牌名称

expires_at
required
integer <int64>

令牌的到期时间

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "expires_at": 0
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有令牌

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取所有令牌名称

Authorizations:
tokenNone
query Parameters
name
required
string

令牌名称

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定令牌

Authorizations:
tokenNone
path Parameters
token_id
required
string^[a-zA-Z0-9-_.]+$

令牌 ID

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定令牌

Authorizations:
tokenNone
path Parameters
token_id
required
string^[a-zA-Z0-9-_.]+$

令牌 ID

Request Body schema: application/json
name
required
string <= 40 characters

令牌名称

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定令牌

Authorizations:
tokenNone
path Parameters
token_id
required
string^[a-zA-Z0-9-_.]+$

令牌 ID

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

重新生成令牌

Authorizations:
tokenNone
path Parameters
token_id
required
string^[a-zA-Z0-9-_.]+$

令牌 ID

Request Body schema: application/json
expires_at
required
integer <int64>

令牌的到期时间

Responses

Request samples

Content type
application/json
{
  • "expires_at": 0
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

网关组

获取所有网关组

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

创建网关组

Authorizations:
tokenNone
Request Body schema: application/json
name
required
string [ 1 .. 1024 ] characters

对象名称

desc
string
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "labels": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

统计网关组的资源

Authorizations:
tokenNone
path Parameters
resource_type
required
string
Enum: "ssl" "consumer" "gateway_instance"

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

删除特定网关组

Authorizations:
tokenNone
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定网关组

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "labels": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定网关组

Authorizations:
tokenNone
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定网关组的所有已发布服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定网关组的已发布服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定网关组的已发布服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定网关组所有已发布服务的版本

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定网关组所有的服务运行时配置

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定网关组的服务运行时配置

Authorizations:
tokenNone
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-empty
hosts
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

Content type
application/json
{
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "upstreams": {
    },
  • "status": 0,
  • "plugins": { }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定网关组的所有授权用户

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

数据平面证书

签发数据平面证书

Authorizations:
tokenNone
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

服务注册中心

获取所有服务注册中心

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

创建服务注册中心

Authorizations:
tokenNone
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
Request Body schema: application/json
One of
name
string [ 1 .. 1024 ] characters

对象名称

desc
string
object
type
required
string
Value: "kubernetes"

Kubernetes 服务类型

required
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "health_check": {
    },
  • "type": "nacos",
  • "nacos_config": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定服务注册中心的详细信息

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定服务注册中心

Authorizations:
tokenNone
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
One of
name
string [ 1 .. 1024 ] characters

对象名称

desc
string
object
type
required
string
Value: "kubernetes"

Kubernetes 服务类型

required
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "desc": "string",
  • "health_check": {
    },
  • "type": "nacos",
  • "nacos_config": {
    }
}

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定服务注册中心

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

获取特定服务注册中心关联的所有服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定(Kubernetes)服务注册中心的所有内部服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有 Nacos 命名空间

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定 Nacos 命名空间下的所有组

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定 Nacos 组内的所有服务

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取所有 Nacos 实例元数据

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0,
  • "value": {
    }
}

获取特定服务注册中心的健康检查历史记录

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

服务版本

获取所有服务版本

Authorizations:
tokenNone
path Parameters
service_version_id
required
string^[a-zA-Z0-9-_.]+$

服务版本 ID

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有路由的服务版本

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

获取特定路由的服务版本

Authorizations:
tokenNone
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

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取服务版本名称

Authorizations:
tokenNone
path Parameters
service_id
required
string^[a-zA-Z0-9-_.]+$

服务 ID

version
required
string

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

标签

获取所有标签

Authorizations:
tokenNone
path Parameters
resource_type
required
string
Enum: "gateway_group" "consumer" "ssl" "service" "route"

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

系统设置

更新系统设置

Authorizations:
tokenNone
Request Body schema: application/json
control_plane_address
Array of strings [ 0 .. 32 ] items unique

Responses

Request samples

Content type
application/json
{
  • "control_plane_address": [
    ]
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有系统设置

Authorizations:
tokenNone

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

登录选项

获取特定登录选项

获取特定登录选项。

Authorizations:
tokenNone
path Parameters
login_option_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定登录选项

更新特定登录选项。

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "logo": "string",
  • "disable": false,
  • "provider_type": "ldap",
  • "oidc_config": {
    },
  • "saml_config": {
    },
  • "ldap_config": {
    },
  • "cas_config": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

更新特定登录选项

更新特定登录选项。

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "logo": "string",
  • "disable": false,
  • "provider_type": "ldap",
  • "oidc_config": {
    },
  • "saml_config": {
    },
  • "ldap_config": {
    },
  • "cas_config": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "key": "string",
  • "warning_msg": "string"
}

删除特定登录选项

删除特定登录选项。

Authorizations:
tokenNone
path Parameters
login_option_id
required
string

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "key": "string",
  • "warning_msg": "string"
}

获取所有登陆选项

获取所有登陆选项。

Authorizations:
tokenNone
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

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

创建登录选项

创建登录选项。

Authorizations:
tokenNone
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

Content type
application/json
{
  • "name": "string",
  • "logo": "string",
  • "disable": false,
  • "provider_type": "ldap",
  • "oidc_config": {
    },
  • "saml_config": {
    },
  • "ldap_config": {
    },
  • "cas_config": {
    }
}

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}