eKuiper REST api allows you to manage external services, such as registering, deleting and listing services, listing external functions.
This API accepts JSON content to create new external services.
POST http://localhost:9081/services
An example of a request for a file on an HTTP server:
{
"name":"random",
"file":"http://127.0.0.1/services/sample.zip"
}
An example of a request for a file on the eKuiper server:
{
"name":"random",
"file":"file:///var/services/sample.zip"
}
A sample zip file of the source named sample.zip
This API is used to display all external services defined in the server.
GET http://localhost:9081/services
Response example:
["sample","sample2"]
This API is used to print detailed definitions of external services.
GET http://localhost:9081/services/{name}
The path parameter name
is the name of the external service.
This API is used to delete external services, and all functions defined under the service will be deleted.
DELETE http://localhost:9081/services/{name}
This API is used to update external services, and its parameters are the same as that of service registration.
PUT http://localhost:9081/services/{name}
{
"name":"random",
"file":"http://127.0.0.1/services/sample.zip"
}
Each service can contain multiple functions. This API is used to display the names of all external functions that can be used in SQL.
GET http://localhost:9081/services/functions
Result example:
["func1","func2"]
This API is used to display the name of the service that defines this external function.
GET http://localhost:9081/services/functions/{name}
Result example:
{
"name": "funcName",
"serviceName": "serviceName"
}