GeniesAccess grants
Genie access grants
Set a Genie access grant
POST
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
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
genie_id*stringThe Genie.
Format
uuidregion*RegionsRegion of the genie: besg (Europe) or usnv (United States)
Value in
"besg""usnv"application/json- body
principal*role*|The role to give; null removes the principal
validate_only?Validate OnlyRun every check of the write and answer 204 without writing: a refused write answers the error the write would
Default
falseOK
application/json- response
genie_id*Genie Idprincipal*role*|nullcurl -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"}