Upload code to Page

This endpoint uploads ZIP file to the page

Request

To upload a new zip file to an existing Page, please make a POST request to the following URL:

Header

ParameterTypeDescription
X-Auth-TokenStringAuthentication Token of account

Body

A ZIP file with the below structure

├── manifest.toml
├── script.js
├── body.html
├── style.css
├── static
│   ├── some_files_or_folders   

📘

ZIP file docs

For further information about the structure and contents of each file, please visit our Developer center

Make sure to replace <path_to_file> with the actual path to ZIP file.

$ curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/pages/66f6e0645b9284000df59a10/code' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
-F 'zipFile=@<path_to_file>.zip;type=application/zip'
{"message": "File successfully uploaded."}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}

Response

{"message": "File successfully uploaded."}