Skip to main content
POST
/
v1
/
organizations
/
{id}
/
shares
Share a resource with the organization (admin only)
curl --request POST \
  --url http://0.0.0.0:3000/v1/organizations/{id}/shares \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource_type": "entity",
  "resource_id": "light.sala",
  "can_view": true,
  "can_control": true,
  "can_edit": false
}
'
{
  "id": 1,
  "org_id": "org_abc123",
  "resource_type": "entity",
  "resource_id": "light.sala",
  "can_view": true,
  "can_control": true,
  "can_edit": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID da organização

Body

application/json
resource_type
enum<string>
required

Tipo do recurso

Available options:
entity,
device,
dashboard
resource_id
string
required

ID do recurso

shared_with_user_id
string | null

ID do usuário (null = todos)

can_view
boolean
default:true
can_control
boolean
default:false
can_edit
boolean
default:false

Response

Share created