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.
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]"
}
Codes :
400 Bad Request
(If python error occurs)403 Forbidden
(If module already exsists)Content :
{
"error": "[whatever the error is]"
}