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 .
All the CRUD processes (Create, Read, Update and Delete) for pages can also be done through the API, parallel to the dedicated UI. You can check our for additional information.
Create
Make the below HTTP request:
curl -X POST '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.
List
List all your pages with the below HTTP request:
curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/pages' \
-H 'X-Auth-Token: <YOUR_TOKEN>'