主题
管理API文档
用户指南
以下是模块快照的一部分。
管理API
Manager API直接操作ETCD并为APIX提供数据管理,为Front-end或其他客户端提供API。
/apix/admin/migrate/export
GET
介绍
Export a config file for migrate.
参数
None.
响应
A file for download.
/apix/admin/migrate/import
介绍
Import the config file for restore config.
POST
参数 (FORM)
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
mode | body(form) | import mode (return, skip or overwrite) | Yes | string |
file | body(form) | file to upload | Yes | string |
响应
Code | Description | Schema |
---|---|---|
0 | import success | ApiError |
20001 | Config conflict | ApiError |
/apix/admin/check_ssl_cert
POST
介绍
verify SSL cert and key.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
cert | body | cert of SSL | Yes | string |
key | body | key of SSL | Yes | string |
响应
Code | Description | Schema |
---|---|---|
0 | SSL verify passed | ApiError |
default | unexpected error | ApiError |
/apix/admin/check_ssl_exists
POST
介绍
Check whether the SSL exists.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
cert | body | cert of SSL | Yes | string |
key | body | key of SSL | Yes | string |
响应
Code | Description | Schema |
---|---|---|
0 | SSL exists | ApiError |
default | unexpected error | ApiError |
/apix/admin/consumers
GET
介绍
Return the consumer list according to the specified page number and page size, and can search consumers by username.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
page | query | page number | No | integer |
page_size | query | page size | No | integer |
username | query | username of consumer | No | string |
响应
Code | Description | Schema |
---|---|---|
0 | list response | [ consumer ] |
default | unexpected error | ApiError |
/apix/admin/notexist/routes
GET
介绍
Return result of route exists checking by name and exclude id.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
name | query | name of route | No | string |
exclude | query | id of route that exclude checking | No | string |
响应
Code | Description | Schema |
---|---|---|
0 | route not exists | ApiError |
default | unexpected error | ApiError |
/apix/admin/routes
GET
介绍
Return the route list according to the specified page number and page size, and can search routes by name and uri.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
page | query | page number | No | integer |
page_size | query | page size | No | integer |
name | query | name of route | No | string |
uri | query | uri of route | No | string |
label | query | label of route | No | string |
响应
Code | Description | Schema |
---|---|---|
0 | list response | [ route ] |
default | unexpected error | ApiError |
/apix/admin/services
GET
介绍
Return the service list according to the specified page number and page size, and can search services by name.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
page | query | page number | No | integer |
page_size | query | page size | No | integer |
name | query | name of service | No | string |
响应
Code | Description | Schema |
---|---|---|
0 | list response | [ service ] |
default | unexpected error | ApiError |
/apix/admin/export/routes/
Summary
Export specific or all routes as OpenAPI schema.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
ids | path | To export specific routes, please provide the route IDs separated by commas. If you leave the ids field empty, all routes will be exported. | No | integer |
响应
Code | Description | Schema |
---|---|---|
0 | openapi json content | [ OpenAPI schema ] |
default | unexpected error | ApiError |
/apix/admin/ssl
GET
介绍
Return the SSL list according to the specified page number and page size, and can SSLs search by sni.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
page | query | page number | No | integer |
page_size | query | page size | No | integer |
sni | query | sni of SSL | No | string |
响应
Code | Description | Schema |
---|---|---|
0 | list response | [ ssl ] |
default | unexpected error | ApiError |
/apix/admin/upstreams
GET
介绍
Return the upstream list according to the specified page number and page size, and can search upstreams by name.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
page | query | page number | No | integer |
page_size | query | page size | No | integer |
name | query | name of upstream | No | string |
响应
Code | Description | Schema |
---|---|---|
0 | list response | [ upstream ] |
default | unexpected error | ApiError |
/apix/admin/user/login
POST
介绍
user login.
参数
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
username | body | user name | Yes | string |
password | body | password | Yes | string |
响应
Code | Description | Schema |
---|---|---|
0 | login success | ApiError |
default | unexpected error | ApiError |
模块
ApiError
Name | Type | Description | Required |
---|---|---|---|
code | long | response code | No |
message | string | response message | No |
BaseInfo
Name | Type | Description | Required |
---|---|---|---|
create_time | long | No | |
id | object | No | |
update_time | long | No |
Consumer
Name | Type | Description | Required |
---|---|---|---|
create_time | long | No | |
desc | string | No | |
id | object | No | |
labels | object | No | |
plugins | object | No | |
update_time | long | No | |
username | string | No |
LoginInput
Name | Type | Description | Required |
---|---|---|---|
password | string | password | No |
username | string | user name | No |
Route
Name | Type | Description | Required |
---|---|---|---|
create_time | long | No | |
desc | string | No | |
enable_websocket | boolean | No | |
filter_func | string | No | |
host | string | No | |
hosts | [ string ] | No | |
id | object | No | |
labels | object | No | |
methods | [ string ] | No | |
name | string | No | |
plugins | object | No | |
priority | long | No | |
remote_addr | string | No | |
remote_addrs | [ string ] | No | |
script | object | No | |
service_id | object | No | |
service_protocol | string | No | |
update_time | long | No | |
upstream | UpstreamDef | No | |
upstream_id | object | No | |
uri | string | No | |
uris | [ string ] | No | |
vars | object | No |
SSL
Name | Type | Description | Required |
---|---|---|---|
cert | string | No | |
certs | [ string ] | No | |
create_time | long | No | |
exptime | long | No | |
id | object | No | |
key | string | No | |
keys | [ string ] | No | |
labels | object | No | |
sni | string | No | |
snis | [ string ] | No | |
status | long | No | |
update_time | long | No | |
validity_end | long | No | |
validity_start | long | No |
Service
Name | Type | Description | Required |
---|---|---|---|
create_time | long | No | |
desc | string | No | |
enable_websocket | boolean | No | |
id | object | No | |
labels | object | No | |
name | string | No | |
plugins | object | No | |
script | string | No | |
update_time | long | No | |
upstream | UpstreamDef | No | |
upstream_id | object | No |
Upstream
Name | Type | Description | Required |
---|---|---|---|
checks | object | No | |
create_time | long | No | |
desc | string | No | |
hash_on | string | No | |
id | object | No | |
k8s_deployment_info | object | No | |
key | string | No | |
labels | object | No | |
name | string | No | |
nodes | object | No | |
pass_host | string | No | |
retries | long | No | |
service_name | string | No | |
timeout | object | No | |
type | string | No | |
update_time | long | No | |
upstream_host | string | No |
UpstreamDef
Name | Type | Description | Required |
---|---|---|---|
checks | object | No | |
desc | string | No | |
hash_on | string | No | |
k8s_deployment_info | object | No | |
key | string | No | |
labels | object | No | |
name | string | No | |
nodes | object | No | |
pass_host | string | No | |
retries | long | No | |
service_name | string | No | |
timeout | object | No | |
type | string | No | |
upstream_host | string | No |