Publish
Publish your code as a ZIP file
Last updated
Was this helpful?
Publish your code as a ZIP file
The last step, after developing the page code and creating the entity in Ubidots, is to upload the code to the Page as a ZIP file. This makes it publicly available so Ubidots can serve it.
Follow these steps:
Compress the files from the Development section into a ZIP file from the root of the file structure, not the parent folder.
Make the following HTTP request. Replace <page_id>, <YOUR_TOKEN>, and <path_to_zip> as needed.
curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/pages/<page_id>/code' \
-H 'X-Auth-Token: <YOUR_TOKEN>' \
-F "zipFile=@<path_to_zip>.zip;type=application/zip"You should receive this response:
{
"message": "File successfully uploaded."
}The ZIP file size is limited to 5 MB.
Once the page is created and the code is uploaded, you can serve the Page from a Ubidots Dashboard. To do so:
Create a dashboard with its type set to Custom.

In the "Custom page URL" field, enter the following URL after replacing <page_id> with your Page ID.
https://industrial.ubidots.com/app/pages/public/<page_id>
This URL is the Ubidots format used to expose your custom code through a URL that can be loaded from a Dashboard.
Last updated
Was this helpful?
Was this helpful?