Skip to content

Reference

Projects

REST API reference for Projects: manage projects and their members, roles and properties. 27 operations.

Reference17 min read

For the base URL, authentication and errors, see the REST API overview.

GET /v1/users/{user}/projects ​

  • Request: GET /v1/users/{user}/projects
  • Operation: ListProjects
  • Operation ID: Project_List
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200)

json
[
  {
    "created": 1792263090704,
    "description": "Description",
    "modified": 1792263090704,
    "name": "Project",
    "project": "project"
  }
]

POST /v1/users/{user}/projects ​

  • Request: POST /v1/users/{user}/projects
  • Operation: CreateProject
  • Operation ID: Project_Create
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
configobjectno
config.limit_bucket_accessbooleannoBucket reads made over the project only return the records of the project's devices (the bucket needs a device tag). Default true for new projects.
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
namestringyesMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
projectstringyesPattern: ^[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: Create Project

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/projects' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "Description",
  "name": "Project",
  "project": "project"
}'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project} ​

  • Request: GET /v1/users/{user}/projects/
  • Operation: ReadProjectConfig
  • Operation ID: Project_ReadConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200, Create Project)

json
{
  "created": 1792263090704,
  "description": "Description",
  "modified": 1792263090704,
  "name": "Project",
  "project": "project"
}

PUT /v1/users/{user}/projects/{project} ​

  • Request: PUT /v1/users/{user}/projects/
  • Operation: UpdateProject
  • Operation ID: Project_Update
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
configobjectno
config.limit_bucket_accessbooleannoBucket reads made over the project only return the records of the project's devices (the bucket needs a device tag). Default true for new projects.
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.

Example request: Full Update

bash
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "Description",
  "name": "Project",
  "project": "project"
}'

Example body: Update 'description'

json
{
  "description": "Description"
}

Example body: Update 'name'

json
{
  "name": "Project"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/users/{user}/projects/{project} ​

  • Request: DELETE /v1/users/{user}/projects/
  • Operation: DeleteProject
  • Operation ID: Project_Delete
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/clone ​

  • Request: GET /v1/users/{user}/projects/{project}/clone
  • Operation: CloneProjectConfig
  • Operation ID: Project_CloneConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/clone' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

POST /v1/users/{user}/projects/{project}/clone ​

  • Request: POST /v1/users/{user}/projects/{project}/clone
  • Operation: CloneProject
  • Operation ID: Project_Clone
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
enabledbooleanno
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
projectstringyesPattern: ^[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

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/clone' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "project": "copy_of_project"
}'

Example body: Copy with name and description

json
{
  "description": "Same configuration as the original, for production line 2",
  "name": "Line 2 copy",
  "project": "line_2_project"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/members ​

  • Request: GET /v1/users/{user}/projects/{project}/members
  • Operation: ListProjectMembers
  • Operation ID: Project_ListMembers
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/members' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200)

json
[
  {
    "created": 1792263090706,
    "enabled": true,
    "member": "jane",
    "modified": 1792263090706
  },
  {
    "created": 1792263090706,
    "enabled": true,
    "member": "tech_madrid",
    "modified": 1792263090706
  },
  {
    "created": 1792263090706,
    "enabled": true,
    "member": "acme_viewer",
    "modified": 1792263090706
  }
]

POST /v1/users/{user}/projects/{project}/members ​

  • Request: POST /v1/users/{user}/projects/{project}/members
  • Operation: CreateProjectMember
  • Operation ID: Project_CreateMember
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Request body (application/json, required)

Shares the project with an account (member = its username). Effective permissions: its own allow / deny plus its project roles and global roles. 'groups' limits it to devices of those asset groups. With 'account' the server first creates that account (verified, role member, this project as default).

FieldTypeRequiredConstraintsDescription
accountobjectno
account.emailstringnoFormat: email
account.passwordstringno
allowobjectno
allow.*objectnoMinimum properties: 1
allow.*.*string or array of string or objectno
allow.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
allow.*.*array of string or objectnoVariant 2:
allow.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
allow.*.*[]objectnoVariant 2: Variant 2:
allow.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
denyobjectno
deny.*objectnoMinimum properties: 1
deny.*.*string or array of string or objectno
deny.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
deny.*.*array of string or objectnoVariant 2:
deny.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
deny.*.*[]objectnoVariant 2: Variant 2:
deny.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
enabledbooleanyes
global_rolesarray of stringnoMaximum items: 10
groupsarray of stringnoMaximum items: 10
hide_menubooleanno
memberstringyesPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
rolesarray of stringnoMaximum items: 10

Example request: Existing account with a role

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/members' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "enabled": true,
  "member": "jane",
  "roles": [
    "operator"
  ]
}'

Example body: Limited to a site

json
{
  "enabled": true,
  "groups": [
    "madrid_plant"
  ],
  "hide_menu": true,
  "member": "tech_madrid",
  "roles": [
    "operator"
  ]
}

Example body: New account

json
{
  "account": {
    "email": "viewer@acme.example",
    "password": "a-long-random-password"
  },
  "enabled": true,
  "member": "acme_viewer",
  "roles": [
    "viewer"
  ]
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/members/{member} ​

  • Request: GET /v1/users/{user}/projects/{project}/members/
  • Operation: ReadProjectMemberConfig
  • Operation ID: Project_ReadMemberConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
memberpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/members/YOUR_MEMBER' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200, Existing account with a role)

json
{
  "created": 1792263090706,
  "enabled": true,
  "member": "jane",
  "modified": 1792263090706,
  "roles": [
    "operator"
  ]
}

Response example (200, Limited to a site)

json
{
  "created": 1792263090706,
  "enabled": true,
  "groups": [
    "madrid_plant"
  ],
  "hide_menu": true,
  "member": "tech_madrid",
  "modified": 1792263090706,
  "roles": [
    "operator"
  ]
}

Response example (200, New account)

json
{
  "account": {
    "email": "viewer@acme.example",
    "password": "a-long-random-password"
  },
  "created": 1792263090706,
  "enabled": true,
  "member": "acme_viewer",
  "modified": 1792263090706,
  "roles": [
    "viewer"
  ]
}

PUT /v1/users/{user}/projects/{project}/members/{member} ​

  • Request: PUT /v1/users/{user}/projects/{project}/members/
  • Operation: UpdateProjectMember
  • Operation ID: Project_UpdateMember
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
memberpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
allowobjectno
allow.*objectnoMinimum properties: 1
allow.*.*string or array of string or objectno
allow.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
allow.*.*array of string or objectnoVariant 2:
allow.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
allow.*.*[]objectnoVariant 2: Variant 2:
allow.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
denyobjectno
deny.*objectnoMinimum properties: 1
deny.*.*string or array of string or objectno
deny.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
deny.*.*array of string or objectnoVariant 2:
deny.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
deny.*.*[]objectnoVariant 2: Variant 2:
deny.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
enabledbooleanno
global_rolesarray of stringnoMaximum items: 10
groupsarray of stringnoMaximum items: 10
hide_menubooleanno
rolesarray of stringnoMaximum items: 10

Example request: Change roles

bash
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/members/YOUR_MEMBER' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "roles": [
    "viewer"
  ]
}'

Example body: Suspend

json
{
  "enabled": false
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/users/{user}/projects/{project}/members/{member} ​

  • Request: DELETE /v1/users/{user}/projects/{project}/members/
  • Operation: DeleteProjectMember
  • Operation ID: Project_DeleteMember
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
memberpathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/members/YOUR_MEMBER' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/properties ​

  • Request: GET /v1/users/{user}/projects/{project}/properties
  • Operation: ListProjectProperties
  • Operation ID: Project_ListProperties
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/properties' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200)

json
[
  {
    "created": 1792263090705,
    "description": "Sampling and alert thresholds",
    "modified": 1792263090705,
    "name": "Settings",
    "property": "settings",
    "type": "configuration",
    "value": {
      "alerts": true,
      "interval": 60,
      "max_temperature": 28.5
    }
  },
  {
    "created": 1792263090705,
    "modified": 1792263090705,
    "name": "Location",
    "property": "location",
    "value": {
      "lat": 40.4168,
      "lon": -3.7038
    }
  },
  {
    "created": 1792263090705,
    "modified": 1792263090705,
    "name": "Calibration",
    "perm": {
      "readOnly": [
        "member"
      ]
    },
    "property": "calibration",
    "value": {
      "gain": 1.02,
      "offset": -0.4
    }
  },
  {
    "created": 1792263090705,
    "modified": 1792263090705,
    "name": "Dashboard",
    "property": "dashboard",
    "value": {
      "source": "url",
      "url": "/v1/users/YOUR_USER/storages/fleet_app/files/"
    }
  }
]

POST /v1/users/{user}/projects/{project}/properties ​

  • Request: POST /v1/users/{user}/projects/{project}/properties
  • Operation: CreateProjectProperty
  • Operation ID: Project_CreateProperty
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Request body (application/json, required)

The body matches one of these 2 variants.

Variant 1

FieldTypeRequiredConstraintsDescription
(body)array of objectno
(body)[].descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
(body)[].formobjectno
(body)[].form.fieldsanyyes
(body)[].namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
(body)[].permobjectno
(body)[].perm.hiddenarray of stringnoUnique items
(body)[].perm.readOnlyarray of stringnoUnique items
(body)[].propertystringyesPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
(body)[].typestringnoOne of: ``, configuration
(body)[].valueanyyes

Variant 2: Property Create. Schema for creating a property

Schema for creating a property

FieldTypeRequiredConstraintsDescription
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
formobjectno
form.fieldsanyyes
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
permobjectno
perm.hiddenarray of stringnoUnique items
perm.readOnlyarray of stringnoUnique items
propertystringyesPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
typestringnoOne of: ``, configuration
valueanyyes

Example request: Configuration value

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/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

json
{
  "name": "Location",
  "property": "location",
  "value": {
    "lat": 40.4168,
    "lon": -3.7038
  }
}

Example body: Read-only for project members

json
{
  "name": "Calibration",
  "perm": {
    "readOnly": [
      "member"
    ]
  },
  "property": "calibration",
  "value": {
    "gain": 1.02,
    "offset": -0.4
  }
}

Example body: Url dashboard of the resource

json
{
  "name": "Dashboard",
  "property": "dashboard",
  "value": {
    "source": "url",
    "url": "/v1/users/YOUR_USER/storages/fleet_app/files/"
  }
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/properties/{property} ​

  • Request: GET /v1/users/{user}/projects/{project}/properties/
  • Operation: ReadProjectProperty
  • Operation ID: Project_ReadProperty
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
propertypathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/properties/YOUR_PROPERTY' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

PUT /v1/users/{user}/projects/{project}/properties/{property} ​

  • Request: PUT /v1/users/{user}/projects/{project}/properties/
  • Operation: UpdateProjectProperty
  • Operation ID: Project_UpdateProperty
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
propertypathstringyes

Request body (application/json, required)

Schema for updating a property

FieldTypeRequiredConstraintsDescription
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
formobjectno
form.fieldsanyyes
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
permobjectno
perm.hiddenarray of stringnoUnique items
perm.readOnlyarray of stringnoUnique items
propertystringnoPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
typestringnoOne of: ``, configuration
valueanyyes

Example request: Hide from project members

bash
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/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

json
{
  "value": {
    "alerts": true,
    "interval": 30,
    "max_temperature": 27
  }
}

Example body: Value, name and description

json
{
  "description": "Faster sampling during commissioning",
  "name": "Settings",
  "value": {
    "alerts": false,
    "interval": 10,
    "max_temperature": 28.5
  }
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

PATCH /v1/users/{user}/projects/{project}/properties/{property} ​

  • Request: PATCH /v1/users/{user}/projects/{project}/properties/
  • Operation: UpdateProjectProperty
  • Operation ID: Project_PatchProperty
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
propertypathstringyes

Request body (application/json, required)

The body matches one of these 2 variants.

Variant 1

FieldTypeRequiredConstraintsDescription
valueanyyes

Variant 2

FieldTypeRequiredConstraintsDescription
*anyno

Example request: Change some fields of the value

bash
curl -X PATCH 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/properties/YOUR_PROPERTY' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "value": {
    "interval": 30
  }
}'

Example body: Flattened fields

json
{
  "value.alerts": false,
  "value.max_temperature": 27
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/users/{user}/projects/{project}/properties/{property} ​

  • Request: DELETE /v1/users/{user}/projects/{project}/properties/
  • Operation: DeleteProjectProperty
  • Operation ID: Project_DeleteProperty
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
propertypathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/properties/YOUR_PROPERTY' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/properties/{property}/clone ​

  • Request: GET /v1/users/{user}/projects/{project}/properties/{property}/clone
  • Operation: CloneProjectPropertyConfig
  • Operation ID: Project_ClonePropertyConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
propertypathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/properties/YOUR_PROPERTY/clone' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

POST /v1/users/{user}/projects/{project}/properties/{property}/clone ​

  • Request: POST /v1/users/{user}/projects/{project}/properties/{property}/clone
  • Operation: CloneProjectProperty
  • Operation ID: Project_CloneProperty
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
propertypathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
enabledbooleanno
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
propertystringyesPattern: ^[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

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/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

json
{
  "description": "Same configuration as the original, for production line 2",
  "name": "Line 2 copy",
  "property": "line_2_property"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/roles ​

  • Request: GET /v1/users/{user}/projects/{project}/roles
  • Operation: ListProjectRoles
  • Operation ID: Project_ListRoles
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/roles' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200)

json
[
  {
    "allow": {
      "Alarm": {
        "*": [
          "List*",
          "Read*",
          "UpdateAlarmInstance"
        ]
      },
      "Bucket": {
        "*": [
          "List*",
          "Read*"
        ]
      },
      "Dashboard": {
        "*": [
          "List*",
          "Read*"
        ]
      },
      "Device": {
        "*": [
          "List*",
          "Read*",
          "AccessDeviceResources"
        ]
      }
    },
    "created": 1792263090706,
    "enabled": true,
    "modified": 1792263090706,
    "role": "operator"
  },
  {
    "allow": {
      "Bucket": {
        "*": [
          "List*",
          "Read*"
        ]
      },
      "Dashboard": {
        "*": [
          "List*",
          "Read*"
        ]
      },
      "Device": {
        "*": [
          "List*",
          "Read*"
        ]
      }
    },
    "created": 1792263090706,
    "enabled": true,
    "modified": 1792263090706,
    "role": "viewer"
  }
]

POST /v1/users/{user}/projects/{project}/roles ​

  • Request: POST /v1/users/{user}/projects/{project}/roles
  • Operation: CreateProjectRole
  • Operation ID: Project_CreateRole
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes

Request body (application/json, required)

A project role is a named set of permissions for members of this project (members.roles). Permissions: {<resource type>: {<resource id or *>: action | [actions]}}; actions accept a trailing * (Read*, List*).

FieldTypeRequiredConstraintsDescription
allowobjectno
allow.*objectnoMinimum properties: 1
allow.*.*string or array of string or objectno
allow.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
allow.*.*array of string or objectnoVariant 2:
allow.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
allow.*.*[]objectnoVariant 2: Variant 2:
allow.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
denyobjectno
deny.*objectnoMinimum properties: 1
deny.*.*string or array of string or objectno
deny.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
deny.*.*array of string or objectnoVariant 2:
deny.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
deny.*.*[]objectnoVariant 2: Variant 2:
deny.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
enabledbooleanyes
rolestringyesPattern: ^[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: Operator

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/roles' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "allow": {
    "Alarm": {
      "*": [
        "List*",
        "Read*",
        "UpdateAlarmInstance"
      ]
    },
    "Bucket": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Dashboard": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Device": {
      "*": [
        "List*",
        "Read*",
        "AccessDeviceResources"
      ]
    }
  },
  "enabled": true,
  "role": "operator"
}'

Example body: Viewer

json
{
  "allow": {
    "Bucket": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Dashboard": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Device": {
      "*": [
        "List*",
        "Read*"
      ]
    }
  },
  "enabled": true,
  "role": "viewer"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/roles/{role} ​

  • Request: GET /v1/users/{user}/projects/{project}/roles/
  • Operation: ReadProjectRoleConfig
  • Operation ID: Project_ReadRoleConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
rolepathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/roles/YOUR_ROLE' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200, Operator)

json
{
  "allow": {
    "Alarm": {
      "*": [
        "List*",
        "Read*",
        "UpdateAlarmInstance"
      ]
    },
    "Bucket": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Dashboard": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Device": {
      "*": [
        "List*",
        "Read*",
        "AccessDeviceResources"
      ]
    }
  },
  "created": 1792263090706,
  "enabled": true,
  "modified": 1792263090706,
  "role": "operator"
}

Response example (200, Viewer)

json
{
  "allow": {
    "Bucket": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Dashboard": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Device": {
      "*": [
        "List*",
        "Read*"
      ]
    }
  },
  "created": 1792263090706,
  "enabled": true,
  "modified": 1792263090706,
  "role": "viewer"
}

PUT /v1/users/{user}/projects/{project}/roles/{role} ​

  • Request: PUT /v1/users/{user}/projects/{project}/roles/
  • Operation: UpdateProjectRole
  • Operation ID: Project_UpdateRole
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
rolepathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
allowobjectno
allow.*objectnoMinimum properties: 1
allow.*.*string or array of string or objectno
allow.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
allow.*.*array of string or objectnoVariant 2:
allow.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
allow.*.*[]objectnoVariant 2: Variant 2:
allow.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
denyobjectno
deny.*objectnoMinimum properties: 1
deny.*.*string or array of string or objectno
deny.*.*stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 1:
deny.*.*array of string or objectnoVariant 2:
deny.*.*[]stringnoPattern: ^[a-zA-Z0-9_\*]{1,64}$|^\*$Variant 2: Variant 1:
deny.*.*[]objectnoVariant 2: Variant 2:
deny.*.*[].*string or array of stringnoVariant 1: Pattern: ^[a-zA-Z0-9_\*]{1,32}$|^\*$Variant 2: Variant 2:
enabledbooleanno

Example request: Disable the role

bash
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/roles/YOUR_ROLE' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "enabled": false
}'

Example body: Replace its permissions

json
{
  "allow": {
    "Dashboard": {
      "*": [
        "List*",
        "Read*"
      ]
    },
    "Device": {
      "*": [
        "List*",
        "Read*"
      ]
    }
  }
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/users/{user}/projects/{project}/roles/{role} ​

  • Request: DELETE /v1/users/{user}/projects/{project}/roles/
  • Operation: DeleteProjectRole
  • Operation ID: Project_DeleteRole
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
rolepathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/roles/YOUR_ROLE' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/projects/{project}/roles/{role}/clone ​

  • Request: GET /v1/users/{user}/projects/{project}/roles/{role}/clone
  • Operation: CloneProjectRoleConfig
  • Operation ID: Project_CloneRoleConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
rolepathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/roles/YOUR_ROLE/clone' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

POST /v1/users/{user}/projects/{project}/roles/{role}/clone ​

  • Request: POST /v1/users/{user}/projects/{project}/roles/{role}/clone
  • Operation: CloneProjectRole
  • Operation ID: Project_CloneRole
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
projectpathstringyes
rolepathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
enabledbooleanno
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
rolestringyesPattern: ^[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

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/projects/YOUR_PROJECT/roles/YOUR_ROLE/clone' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "role": "copy_of_role"
}'

Example body: Copy with name and description

json
{
  "description": "Same configuration as the original, for production line 2",
  "name": "Line 2 copy",
  "role": "line_2_role"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden