This API accepts JSON content to create new external 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 Kuiper server:
{
"name":"random",
"file":"file:///var/services/sample.zip"
}
- name: The unique name of the external service, which must be exactly the same as the json file of service definition in the zip file.
- file: URL of external service file. URL supports http, https and file modes. When using the file mode, the file must be on the machine where the Kuiper server is located. It must be a zip file, which contains the service description json file with the same name as the service and any other auxiliary files. The schema file must be in the schema folder.
A sample zip file of the source named sample.zip
- sample.json
- Schema directory: it contains one or more schema files used by the service. For example, sample.proto.
Display external services
Response example:
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.
Delete external services
This API is used to delete external services, and all functions defined under the service will be deleted.
DELETE http://localhost:9081/services/{name}
{
"name":"random",
}
Display all external functions
Each service can contain multiple functions. This API is used to display the names of all external functions that can be used in SQL.
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"
}