See Stacksync in action with a solution architect. Book a demo ↗
GeniesAccess grants

Genie access grants

Set a Genie access grant

POST
/v1/workspaces/{workspace_id}/genies/{genie_id}/access-grants

Gives a user or a group a role on a Genie (operator uses it, editor changes it, owner manages its access), changes it, or removes it (role null). Who may change access is decided per genie, as in the web app: an owner of the genie, or a workspace admin adding an owner. A genie always keeps one owner.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

genie_id*string

The Genie.

Formatuuid

Query Parameters

region*Regions

Region of the genie: besg (Europe) or usnv (United States)

Value in"besg""usnv"

Request Body

application/json
  1. body
principal*
role*|

The role to give; null removes the principal

validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response
genie_id*Genie Id
principal*
role*|null
Set a Genie access grant
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/genies/497f6eca-6276-4993-bfeb-53cbbbba6f08/access-grants?region=besg' \  -H 'Content-Type: application/json' \  -d '{  "principal": {    "type": "user",    "id": "<id>"  },  "role": "operator"}'
{  "genie_id": "<genie_id>",  "principal": {    "type": "user",    "id": "<id>"  },  "role": "operator"}