跳到主要内容

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