A Page is the entity in Ubidots that will hold the custom code, and will provide a reference to it that can be loaded from a Dashboard page.
Currently, all the CRUD process (Create, Read, Update and Delete) for pages is done through the API. You can check our API Reference for additional information.
Create
Make the below HTTP request:
curl-XPOST'https://industrial.api.ubidots.com/api/v2.0/pages' \-H 'X-Auth-Token: <YOUR_TOKEN>' \-H 'Content-Type: application/json' \-d '{"name": "My First Page"}'
The response will be as follows:
{"id":"66fc141609164d000e1e0fab","url":"https://industrial.api.ubidots.com/api/v2.0/pages/66fc141609164d000e1e0fab","label":"my-first-page","name":"My First Page","isActive":true,"createdAt":"2024-10-01T15:24:06.863703Z","settings": {}}
Note that the name was used to create the Page label by lowercasing and replacing spaces with dashes.
{"id":"66fc141609164d000e1e0fab","url":"https://industrial.api.ubidots.com/api/v2.0/pages/66fc141609164d000e1e0fab","label":"my-first-page","name":"My First Page","isActive":true,"createdAt":"2024-10-01T15:24:06.863703Z","settings": {}}