RESTful 接口

connector 创建、启动、停止;集群的信息获取

RESTful API

请求模板

GET http://{ip地址}:{port}/connectors/:connector-name?config=:config

Path Parameters

Name
Type
Description

ip地址

string

runtime 运行的IP地址

port

string

端口号,默认为8081

connector名称

string

一个唯一的标识,stopAll除外

Query Parameters

Name
Type
Description

config

object

  connector实例的具体参数

success

 更多Connector参数请具体参考对应Connector的设置说明

启动或创建一个connector

GET http://localhost:8081/connectors/:connector-name?config=:config

启动一个存在的connector或者创建一个新的connector并启动 注:这里将模板的参数已经赋值

Path Parameters

Name
Type
Description

connector-name

string

connector名称,如上文的connector-example

Query Parameters

Name
Type
Description

config

object

Connector具体参数,如上文的config

停止一个connector

GET http://localhost:8081/connectors/:connector-name/stop

停止一个运行的connector并删除对应的设置

Path Parameters

Name
Type
Description

connector-name

string

connector名称

获取connector状态

GET http://localhost:8081/connectors/:connector-name/status

获取一个connector的状态

Path Parameters

Name
Type
Description

connector-name

string

connector名称

重新加载plugin目录下的Connector文件

GET http://localhost:8081/plugin/reload

重新加载plugin目录下的Connector文件,用于在runtime运行过程中新增Connector实例

获取某个connector的配置信息

GET http://localhost:8081/connectors/:connector-name/config

获取某个connector的配置信息

Path Parameters

Name
Type
Description

connector-name

string

connector名称

停止并删除所有的connector和所有配置信息

GET http://localhost:8081/connectors/stopAll

停止并删除所有的connector和所有配置信息

获取所有connector和task配置信息

GET http://localhost:8081/getConfigInfo

获取所有的配置信息

获取集群信息

GET http://localhost:8081/getClusterInfo

获取集群信息

获取负载信息

GET http://localhost:8081/getAllocatedInfo

获取当前worker的负载信息

Last updated

Was this helpful?