For the base URL, authentication and errors, see the REST API overview.
GET /v1/users/{user}/types
- Request: GET /v1/users/{user}/types
- Operation: ListTypes
- Operation ID:
Type_List - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes |
Example request
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/types' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
Response example (200)
[
{
"description": "Gas boilers with remote control",
"name": "Boiler",
"type": "boiler"
}
]POST /v1/users/{user}/types
- Request: POST /v1/users/{user}/types
- Operation: CreateType
- Operation ID:
Type_Create - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes |
Request body (application/json, required)
An asset type is what a device is (boiler, meter, gateway). Devices join one with their asset_type field and inherit its properties.
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | ||
name | string | no | ||
type | string | yes | Pattern: ^[a-zA-Z0-9_-]{1,32}$ | A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters. |
Example request: Boiler
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/types' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"description": "Gas boilers with remote control",
"name": "Boiler",
"type": "boiler"
}'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
GET /v1/users/{user}/types/{type}
- Request: GET /v1/users/{user}/types/
- Operation: ReadTypeConfig
- Operation ID:
Type_ReadConfig - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Example request
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
Response example (200, Boiler)
{
"description": "Gas boilers with remote control",
"name": "Boiler",
"type": "boiler"
}PUT /v1/users/{user}/types/{type}
- Request: PUT /v1/users/{user}/types/
- Operation: UpdateType
- Operation ID:
Type_Update - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Request body (application/json, required)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | ||
name | string | no |
Example request: Rename
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"description": "Condensing gas boilers",
"name": "Gas boiler"
}'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
DELETE /v1/users/{user}/types/{type}
- Request: DELETE /v1/users/{user}/types/
- Operation: DeleteType
- Operation ID:
Type_Delete - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Example request
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
GET /v1/users/{user}/types/{type}/clone
- Request: GET /v1/users/{user}/types/{type}/clone
- Operation: CloneTypeConfig
- Operation ID:
Type_CloneConfig - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Example request
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/clone' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
POST /v1/users/{user}/types/{type}/clone
- Request: POST /v1/users/{user}/types/{type}/clone
- Operation: CloneType
- Operation ID:
Type_Clone - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Request body (application/json, required)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | Maximum length: 255 | A brief description of the resource, providing context or additional information, limited to 255 characters. |
enabled | boolean | no | ||
name | string | no | Maximum length: 255 | The name of the resource, limited to 255 characters. It can include any character. |
type | string | yes | Pattern: ^[a-zA-Z0-9_-]{1,32}$ | A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters. |
Example request: Copy with a new id
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/clone' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"type": "copy_of_type"
}'Example body: Copy with name and description
{
"description": "Same configuration as the original, for production line 2",
"name": "Line 2 copy",
"type": "line_2_type"
}Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
GET /v1/users/{user}/types/{type}/locations
- Request: GET /v1/users/{user}/types/{type}/locations
- Operation: ReadAssetsLocations
- Operation ID:
Type_ReadAssetsLocations - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Example request
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/locations' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
PUT /v1/users/{user}/types/{type}/projects
- Request: PUT /v1/users/{user}/types/{type}/projects
- Operation: UpdateTypeProjects
- Operation ID:
Type_UpdateProjects - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Request body (application/json, required)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
(body) | array of string | no | Projects the resource belongs to, as <owner>@<project> ids. Replaces the whole list: read the current one first to add or remove a single project; [] removes it from every project. |
Example request: No projects
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/projects' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '[]'Example body: One project
[
"YOUR_USER@greenhouse"
]Example body: Two projects
[
"YOUR_USER@greenhouse",
"YOUR_USER@maintenance"
]Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
GET /v1/users/{user}/types/{type}/properties
- Request: GET /v1/users/{user}/types/{type}/properties
- Operation: ListTypeProperties
- Operation ID:
Type_ListProperties - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Example request
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
Response example (200)
[
{
"created": 1792263090710,
"description": "Sampling and alert thresholds",
"modified": 1792263090710,
"name": "Settings",
"property": "settings",
"type": "configuration",
"value": {
"alerts": true,
"interval": 60,
"max_temperature": 28.5
}
},
{
"created": 1792263090710,
"modified": 1792263090710,
"name": "Location",
"property": "location",
"value": {
"lat": 40.4168,
"lon": -3.7038
}
},
{
"created": 1792263090710,
"modified": 1792263090710,
"name": "Calibration",
"perm": {
"readOnly": [
"member"
]
},
"property": "calibration",
"value": {
"gain": 1.02,
"offset": -0.4
}
},
{
"created": 1792263090710,
"modified": 1792263090710,
"name": "Dashboard",
"property": "dashboard",
"value": {
"source": "url",
"url": "/v1/users/YOUR_USER/storages/fleet_app/files/"
}
}
]POST /v1/users/{user}/types/{type}/properties
- Request: POST /v1/users/{user}/types/{type}/properties
- Operation: CreateTypeProperty
- Operation ID:
Type_CreateProperty - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes |
Request body (application/json, required)
The body matches one of these 2 variants.
Variant 1
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
(body) | array of object | no | ||
(body)[].description | string | no | Maximum length: 255 | A brief description of the resource, providing context or additional information, limited to 255 characters. |
(body)[].form | object | no | ||
(body)[].form.fields | any | yes | ||
(body)[].name | string | no | Maximum length: 255 | The name of the resource, limited to 255 characters. It can include any character. |
(body)[].perm | object | no | ||
(body)[].perm.hidden | array of string | no | Unique items | |
(body)[].perm.readOnly | array of string | no | Unique items | |
(body)[].property | string | yes | Pattern: ^[a-zA-Z0-9_-]{1,32}$ | A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters. |
(body)[].type | string | no | One of: ``, configuration | |
(body)[].value | any | yes |
Variant 2: Property Create. Schema for creating a property
Schema for creating a property
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | Maximum length: 255 | A brief description of the resource, providing context or additional information, limited to 255 characters. |
form | object | no | ||
form.fields | any | yes | ||
name | string | no | Maximum length: 255 | The name of the resource, limited to 255 characters. It can include any character. |
perm | object | no | ||
perm.hidden | array of string | no | Unique items | |
perm.readOnly | array of string | no | Unique items | |
property | string | yes | Pattern: ^[a-zA-Z0-9_-]{1,32}$ | A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters. |
type | string | no | One of: ``, configuration | |
value | any | yes |
Example request: Configuration value
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"description": "Sampling and alert thresholds",
"name": "Settings",
"property": "settings",
"type": "configuration",
"value": {
"alerts": true,
"interval": 60,
"max_temperature": 28.5
}
}'Example body: Location
{
"name": "Location",
"property": "location",
"value": {
"lat": 40.4168,
"lon": -3.7038
}
}Example body: Read-only for project members
{
"name": "Calibration",
"perm": {
"readOnly": [
"member"
]
},
"property": "calibration",
"value": {
"gain": 1.02,
"offset": -0.4
}
}Example body: Url dashboard of the resource
{
"name": "Dashboard",
"property": "dashboard",
"value": {
"source": "url",
"url": "/v1/users/YOUR_USER/storages/fleet_app/files/"
}
}Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
GET /v1/users/{user}/types/{type}/properties/{property}
- Request: GET /v1/users/{user}/types/{type}/properties/
- Operation: ReadTypeProperty
- Operation ID:
Type_ReadProperty - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes | |
property | path | string | yes |
Example request
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties/YOUR_PROPERTY' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
PUT /v1/users/{user}/types/{type}/properties/{property}
- Request: PUT /v1/users/{user}/types/{type}/properties/
- Operation: UpdateTypeProperty
- Operation ID:
Type_UpdateProperty - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes | |
property | path | string | yes |
Request body (application/json, required)
Schema for updating a property
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | Maximum length: 255 | A brief description of the resource, providing context or additional information, limited to 255 characters. |
form | object | no | ||
form.fields | any | yes | ||
name | string | no | Maximum length: 255 | The name of the resource, limited to 255 characters. It can include any character. |
perm | object | no | ||
perm.hidden | array of string | no | Unique items | |
perm.readOnly | array of string | no | Unique items | |
property | string | no | Pattern: ^[a-zA-Z0-9_-]{1,32}$ | A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters. |
type | string | no | One of: ``, configuration | |
value | any | yes |
Example request: Hide from project members
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties/YOUR_PROPERTY' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"perm": {
"hidden": [
"member"
]
},
"value": "internal note"
}'Example body: Replace the value
{
"value": {
"alerts": true,
"interval": 30,
"max_temperature": 27
}
}Example body: Value, name and description
{
"description": "Faster sampling during commissioning",
"name": "Settings",
"value": {
"alerts": false,
"interval": 10,
"max_temperature": 28.5
}
}Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
PATCH /v1/users/{user}/types/{type}/properties/{property}
- Request: PATCH /v1/users/{user}/types/{type}/properties/
- Operation: UpdateTypeProperty
- Operation ID:
Type_PatchProperty - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes | |
property | path | string | yes |
Request body (application/json, required)
The body matches one of these 2 variants.
Variant 1
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
value | any | yes |
Variant 2
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
* | any | no |
Example request: Change some fields of the value
curl -X PATCH 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties/YOUR_PROPERTY' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"value": {
"interval": 30
}
}'Example body: Flattened fields
{
"value.alerts": false,
"value.max_temperature": 27
}Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
DELETE /v1/users/{user}/types/{type}/properties/{property}
- Request: DELETE /v1/users/{user}/types/{type}/properties/
- Operation: DeleteTypeProperty
- Operation ID:
Type_DeleteProperty - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes | |
property | path | string | yes |
Example request
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties/YOUR_PROPERTY' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
GET /v1/users/{user}/types/{type}/properties/{property}/clone
- Request: GET /v1/users/{user}/types/{type}/properties/{property}/clone
- Operation: CloneTypePropertyConfig
- Operation ID:
Type_ClonePropertyConfig - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes | |
property | path | string | yes |
Example request
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties/YOUR_PROPERTY/clone' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
POST /v1/users/{user}/types/{type}/properties/{property}/clone
- Request: POST /v1/users/{user}/types/{type}/properties/{property}/clone
- Operation: CloneTypeProperty
- Operation ID:
Type_CloneProperty - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user | path | string | yes | |
type | path | string | yes | |
property | path | string | yes |
Request body (application/json, required)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | Maximum length: 255 | A brief description of the resource, providing context or additional information, limited to 255 characters. |
enabled | boolean | no | ||
name | string | no | Maximum length: 255 | The name of the resource, limited to 255 characters. It can include any character. |
property | string | yes | Pattern: ^[a-zA-Z0-9_-]{1,32}$ | A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters. |
Example request: Copy with a new id
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/types/YOUR_TYPE/properties/YOUR_PROPERTY/clone' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"property": "copy_of_property"
}'Example body: Copy with name and description
{
"description": "Same configuration as the original, for production line 2",
"name": "Line 2 copy",
"property": "line_2_property"
}Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |