For the complete documentation index, see llms.txt. This page is also available as Markdown.

Publish

Publish your code as a ZIP file

Upload code

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:

  1. Compress the files from the Development section into a ZIP file from the root of the file structure, not the parent folder.

  2. 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."
}

Load code

Once the page is created and the code is uploaded, you can serve the Page from a Ubidots Dashboard. To do so:

  1. Create a dashboard with its type set to Custom.

  2. 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?