EEG-Workflow-System

Back to API docs

Block Zip Upload

This API is to upload custom blocks via Zip file to the application.

URL : /api/workflow/upload

Method : POST

Auth required : YES

Permissions required : None

Data constraints :

Authentication token in the cookie header.
Form-data (application-type: multipart/form-data) format expected from the client to the server.

{
    "file": (binary)
}

The file (binary), is the zip file containing the modules. For example, zip the Arithmetic folder and send to the API to register the blocks.
Check How to create blocks to better understand the modules and blocks.

Success Response

Code : 200 SUCCESS

Content :
Return JSON format (mimetype: application/json) from server to client. Check the API response format for the Arithmetic block as an example.

{
    "new_blocks_length": "[number of new blocks]"
}

Error Responses

Codes :

Content :

{
    "error": "[whatever the error is]"
}