Spaces¶
Spaces organize instances and are the usual unit for granting permissions.
See what's there¶
| Action | Request | Notes |
|---|---|---|
| List your spaces | GET /v4/spaces |
Always includes myspace, even before anything is stored in it |
| Details of a space | GET /v4/spaces/{space} |
identifier, name, and permissions with ?permissions=true. Needs MANAGE_SPACE. |
Your private space¶
Every user has a private space, in which they are always administrator. Use the name myspace wherever a space is
expected. Responses also show it as myspace, in _space and everywhere else.
curl -X POST "$CORE/instances?space=myspace" -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"@type": "https://example.org/types/Note", "https://example.org/properties/text": "Only for me"}'
A space specification can't be set for a private space.
Creating spaces¶
A space is created when something is first stored in it, if the user has MANAGE_SPACE for it. You can also set one
up in advance with a specification.
Space specification¶
| Action | Request |
|---|---|
| Read | GET /v4/spaces/{space}/specification |
| Create or replace | PUT /v4/spaces/{space}/specification |
| Remove | DELETE /v4/spaces/{space}/specification |
All need MANAGE_SPACE, granted by OWNER or stronger.
| Setting | Effect |
|---|---|
autoRelease |
Each change to an instance in this space is released automatically |
clientSpace |
Stored and returned for clients. Core doesn't act on it. |
deferCache |
Stored and returned for clients. Core doesn't act on it. |
When reading, explicitSpecification tells you whether the space has been specified or only has defaults.
Removing the specification deletes the space if it's unused. A space still in use is reset to the defaults and flagged as no longer specified.
Types in a space¶
Core records which types occur in which space as data arrives. You can also manage this explicitly, for example so a type can be offered in an otherwise empty space.
| Action | Request |
|---|---|
| Read | GET /v4/spaces/{space}/types?type=... |
| Assign | PUT /v4/spaces/{space}/types?type=... |
| Remove | DELETE /v4/spaces/{space}/types?type=... |
These also need MANAGE_SPACE.