This endpoint creates a new Page.
Request
To create a new Page please make a POST request to the following URL:
HTTP Method | URL |
---|---|
POST | https://industrial.api.ubidots.com/api/v2.0/pages/ |
Header
Parameter | Type | Description |
---|---|---|
X-Auth-Token | String | Authentication Token of account |
Content-Type | String (application/json) | Content type of body |
Body
Parameter | Type | Required? | Default Value | Description |
---|---|---|---|---|
label | String | Yes | NA | Label of the Page |
name | String | No | NA | Name of the Page |
$ curl -X POST '<https://industrial.api.ubidots.com/api/v2.0/pages/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
-H 'Content-Type: application/json' \
-d '{
"label":"my-first-page",
"name":"My First Page"
}'
{
"id": "66e9a2aae24bae000e144c30",
"url": "https://industrial.ubidots.com/api/v2.0/pages/66e9a2aae24bae000e144c30",
"label": "my-first-page",
"name": "My First Page",
"isActive": true,
"createdAt": "2024-09-17T15:39:22.669736Z",
"settings": {
}
}
{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}
{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}
Response
Returns a Page object of the created Page.