Skip to content

管理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)
NameLocated inDescriptionRequiredSchema
modebody(form)import mode (return, skip or overwrite)Yesstring
filebody(form)file to uploadYesstring
响应
CodeDescriptionSchema
0import successApiError
20001Config conflictApiError

/apix/admin/check_ssl_cert

POST

介绍

verify SSL cert and key.

参数
NameLocated inDescriptionRequiredSchema
certbodycert of SSLYesstring
keybodykey of SSLYesstring
响应
CodeDescriptionSchema
0SSL verify passedApiError
defaultunexpected errorApiError

/apix/admin/check_ssl_exists

POST

介绍

Check whether the SSL exists.

参数
NameLocated inDescriptionRequiredSchema
certbodycert of SSLYesstring
keybodykey of SSLYesstring
响应
CodeDescriptionSchema
0SSL existsApiError
defaultunexpected errorApiError

/apix/admin/consumers

GET

介绍

Return the consumer list according to the specified page number and page size, and can search consumers by username.

参数
NameLocated inDescriptionRequiredSchema
pagequerypage numberNointeger
page_sizequerypage sizeNointeger
usernamequeryusername of consumerNostring
响应
CodeDescriptionSchema
0list response[ consumer ]
defaultunexpected errorApiError

/apix/admin/notexist/routes

GET

介绍

Return result of route exists checking by name and exclude id.

参数
NameLocated inDescriptionRequiredSchema
namequeryname of routeNostring
excludequeryid of route that exclude checkingNostring
响应
CodeDescriptionSchema
0route not existsApiError
defaultunexpected errorApiError

/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.

参数
NameLocated inDescriptionRequiredSchema
pagequerypage numberNointeger
page_sizequerypage sizeNointeger
namequeryname of routeNostring
uriqueryuri of routeNostring
labelquerylabel of routeNostring
响应
CodeDescriptionSchema
0list response[ route ]
defaultunexpected errorApiError

/apix/admin/services

GET

介绍

Return the service list according to the specified page number and page size, and can search services by name.

参数
NameLocated inDescriptionRequiredSchema
pagequerypage numberNointeger
page_sizequerypage sizeNointeger
namequeryname of serviceNostring
响应
CodeDescriptionSchema
0list response[ service ]
defaultunexpected errorApiError

/apix/admin/export/routes/

Summary

Export specific or all routes as OpenAPI schema.

参数
NameLocated inDescriptionRequiredSchema
idspathTo export specific routes, please provide the route IDs separated by commas. If you leave the ids field empty, all routes will be exported.Nointeger
响应
CodeDescriptionSchema
0openapi json content[ OpenAPI schema ]
defaultunexpected errorApiError

/apix/admin/ssl

GET

介绍

Return the SSL list according to the specified page number and page size, and can SSLs search by sni.

参数
NameLocated inDescriptionRequiredSchema
pagequerypage numberNointeger
page_sizequerypage sizeNointeger
sniquerysni of SSLNostring
响应
CodeDescriptionSchema
0list response[ ssl ]
defaultunexpected errorApiError

/apix/admin/upstreams

GET

介绍

Return the upstream list according to the specified page number and page size, and can search upstreams by name.

参数
NameLocated inDescriptionRequiredSchema
pagequerypage numberNointeger
page_sizequerypage sizeNointeger
namequeryname of upstreamNostring
响应
CodeDescriptionSchema
0list response[ upstream ]
defaultunexpected errorApiError

/apix/admin/user/login

POST

介绍

user login.

参数
NameLocated inDescriptionRequiredSchema
usernamebodyuser nameYesstring
passwordbodypasswordYesstring
响应
CodeDescriptionSchema
0login successApiError
defaultunexpected errorApiError

模块

ApiError

NameTypeDescriptionRequired
codelongresponse codeNo
messagestringresponse messageNo

BaseInfo

NameTypeDescriptionRequired
create_timelongNo
idobjectNo
update_timelongNo

Consumer

NameTypeDescriptionRequired
create_timelongNo
descstringNo
idobjectNo
labelsobjectNo
pluginsobjectNo
update_timelongNo
usernamestringNo

LoginInput

NameTypeDescriptionRequired
passwordstringpasswordNo
usernamestringuser nameNo

Route

NameTypeDescriptionRequired
create_timelongNo
descstringNo
enable_websocketbooleanNo
filter_funcstringNo
hoststringNo
hosts[ string ]No
idobjectNo
labelsobjectNo
methods[ string ]No
namestringNo
pluginsobjectNo
prioritylongNo
remote_addrstringNo
remote_addrs[ string ]No
scriptobjectNo
service_idobjectNo
service_protocolstringNo
update_timelongNo
upstreamUpstreamDefNo
upstream_idobjectNo
uristringNo
uris[ string ]No
varsobjectNo

SSL

NameTypeDescriptionRequired
certstringNo
certs[ string ]No
create_timelongNo
exptimelongNo
idobjectNo
keystringNo
keys[ string ]No
labelsobjectNo
snistringNo
snis[ string ]No
statuslongNo
update_timelongNo
validity_endlongNo
validity_startlongNo

Service

NameTypeDescriptionRequired
create_timelongNo
descstringNo
enable_websocketbooleanNo
idobjectNo
labelsobjectNo
namestringNo
pluginsobjectNo
scriptstringNo
update_timelongNo
upstreamUpstreamDefNo
upstream_idobjectNo

Upstream

NameTypeDescriptionRequired
checksobjectNo
create_timelongNo
descstringNo
hash_onstringNo
idobjectNo
k8s_deployment_infoobjectNo
keystringNo
labelsobjectNo
namestringNo
nodesobjectNo
pass_hoststringNo
retrieslongNo
service_namestringNo
timeoutobjectNo
typestringNo
update_timelongNo
upstream_hoststringNo

UpstreamDef

NameTypeDescriptionRequired
checksobjectNo
descstringNo
hash_onstringNo
k8s_deployment_infoobjectNo
keystringNo
labelsobjectNo
namestringNo
nodesobjectNo
pass_hoststringNo
retrieslongNo
service_namestringNo
timeoutobjectNo
typestringNo
upstream_hoststringNo