Skip to content

The eKuiper REST api for configuration file uploads allows you to upload configuration files and list all uploaded files.

Upload a configuration file

The API supports to upload a local file, provide the text content of file or upload a http file link. The upload request will save the file into your ${dataPath}/uploads. It will override the existed file of the same name. The response is the absolute path of the uploaded file which you can refer in other configurations.

Upload by a file

The API accepts a multipart file upload requests. Below is an example html file to upload file to In the form data, the file input name must be uploadFile.

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Upload File</title>
      <input type="file" name="uploadFile" />
      <input type="submit" value="upload" />

Upload by content

Provide the text content and file name to create a configuration file.

POST http://localhost:9081/config/uploads

  "name": "my.json",
  "content": "{\"hello\":\"world\"}"

Should put the file in HTTP Server in advance

POST http://localhost:9081/config/uploads

  "name": "my.json",
  "file": ""

Show uploaded file list

The API is used for displaying all files in the ${dataPath}/uploads path.

GET http://localhost:9081/config/uploads

Response Sample:


Delete an uploaded file

The API is used for deleting a file in the ${dataPath}/uploads path.

DELETE http://localhost:9081/config/uploads/{fileName}