Skip to main content

Sharing elements

This page walks through the everyday tasks of sharing elements with other users: giving users permissions, finding out who has access, and moving or changing grants. For the rules behind it, see the access model. If you want to share with many users at once, create a group first, see managing groups (which also explains who may hand out access).

Sharing and transferring ownership

To share an element with someone else, grant their user (or, following the tip to use groups, a group they belong to) one of the HAS_X_ACCESS relations, or OWNS for full access - see the access model for the full set of operations and how conditional access (per type, per parent, per creator) works.

To hand ownership of an element over to someone else entirely, rather than just sharing it, see transfer of ownership - it also covers what to watch out for so you don’t lock yourself out mid-transfer.

Giving users permissions

To give a user access to an element, create the matching HAS_X_ACCESS relation from the user to the element, see POST /. The following request lets a user read the element:

curl \
-H 'Authorization: Bearer secret-token:QKTDyqBQrfYjKF1oTxBihQ' \
-H 'Content-Type: application/json' \
-d '{
"type": "HAS_READ_ACCESS",
"start": "02IiNr0FNRCkxRCHEPHSxFSGU8CxUAk56rBhy",
"end": "02IiNr0FNRCl5pcUAdeEaZb8mUHjn4zaiEipV"
}' \
https://api.example.com/

The answer points to the new relation:

Access-Control-Allow-Headers: Authorization, Content-Type
Access-Control-Allow-Methods: GET, HEAD, OPTIONS, POST
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Location
Allow: GET, HEAD, OPTIONS, POST
Cache-Control: no-cache, private
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Date: Sat, 28 Nov 2026 21:04:37 GMT
Location: /02IiNr0GPAdceCGrGCmAvfaQznmiK13RbXn6c
X-Powered-By: Ember Nexus API

The request succeeds (see who may hand out access) if you can read the user and the element, and either own the element or hold both HAS_GOVERN_ACCESS and HAS_READ_ACCESS to it. If you can not see the user or the element, the answer is 404; if you can see both but are not allowed to hand out the access, it is 403.

The access operations are HAS_READ_ACCESS, HAS_CREATE_ACCESS, HAS_UPDATE_ACCESS, HAS_DELETE_ACCESS, HAS_SEARCH_ACCESS, HAS_GOVERN_ACCESS and HAS_EXECUTE_ACCESS. HAS_GOVERN_ACCESS lets the recipient hand out access to the element themselves, which is why it is not part of the other operations. HAS_EXECUTE_ACCESS lets the recipient run the element, which only makes sense for saved searches, and is independent of read access. Prefer granting access to a group instead of to single users, see organizing data and managing groups.

HAS_SEARCH_ACCESS and HAS_GOVERN_ACCESS can not carry conditions, as who may find an element is calculated in advance; requests which set one are refused with 400.

A giver who can update the element, but does not hold HAS_GOVERN_ACCESS to it, receives the following answer (recorded from a request like the one above, sent by a giver who has update access but no HAS_GOVERN_ACCESS):

{
"type": "http://api/error/403/forbidden",
"title": "Forbidden",
"status": 403,
"instance": "urn:uuid:02IiNrJEwCgQc56ClL9NmqlHyOMmivmK3TmYa",
"detail": "Creating a HAS_UPDATE_ACCESS relation requires unconditional GOVERN access to the target element."
}

Seeing who has access

GET /<uuid>/access lists, per access type, the users and groups which may do something with an element. Use it for sharing dialogs (“Alice and Editors can edit”, “public”), and to find the grant relations you may want to delete when revoking access. Everybody who can read the element may ask; only users and groups which the asking user can read are listed.

curl \
-H 'Authorization: Bearer secret-token:m645AtdO7nx1vOhLE5DPxA' \
https://api.example.com/02IiNr0GPCDq6bIfaIK7rt5QIXdCSXQN3YgMt/access
{
"type": "_ElementAccess",
"id": "/02IiNr0GPCDq6bIfaIK7rt5QIXdCSXQN3YgMt/access",
"element": "02IiNr0GPCDq6bIfaIK7rt5QIXdCSXQN3YgMt",
"public": false,
"truncated": false,
"access": {
"read": [
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6",
"02IiNr0GPCDq6LhrEqKZGZSqVv0utssJw3uo0",
"02IiNr0GPCDq6QOyrnRIQQxXDq3l3RPKTUZ2k"
],
"search": [
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6",
"02IiNr0GPCDq6QOyrnRIQQxXDq3l3RPKTUZ2k"
],
"create": [
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6"
],
"update": [
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6",
"02IiNr0GPCDq6MkGxMyqwlXNGinOuJCHfGH92"
],
"delete": [
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6"
],
"govern": [
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6"
],
"execute": [
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6"
]
},
"principals": {
"02IiNr0GPCDq6KfeDDF2xpddEIw4o60H70HI6": {
"type": "User",
"name": "Alice"
},
"02IiNr0GPCDq6LhrEqKZGZSqVv0utssJw3uo0": {
"type": "User",
"name": "Viewer"
},
"02IiNr0GPCDq6MkGxMyqwlXNGinOuJCHfGH92": {
"type": "User",
"name": "Bob"
},
"02IiNr0GPCDq6QOyrnRIQQxXDq3l3RPKTUZ2k": {
"type": "Group",
"name": "Editors"
}
}
}

Here a group can read and search, one user can update, and the owner holds everything; principals describes every listed id. To find out what a single user or group may do, add the principal parameter with its id, or me for the current user.

Moving a grant to another node

Changing the start node of a relation is not possible, but a recipient can move a grant to a node they control, for example for organizational reasons: create a parallel relation from the new node, then delete the original. This requires HAS_GOVERN_ACCESS to the element (besides the access which is moved), as creating the parallel relation hands out access like any other grant:

  1. Create the new relation, e.g. HAS_UPDATE_ACCESS from the own group to the element.
  2. Delete the original relation, which is allowed as the recipient owns its start node.

Changing grants

Conditions on a grant can only be changed by users who hold HAS_GOVERN_ACCESS to the element, and the access which the grant hands out. This also keeps recipients from removing the conditions of their own grants. Users who merely own the recipient group do not have this right, as the grant is a statement about the element, not about the group.