Grant Access Right
POST/v1/access-rights/:folder_id/:resource_type
Grant a user or a group a permission on one kind of content in a folder.
resource_type is viz or dataset (the other types are refused with
400: nothing reads them). permission is view, edit, delete or
create; accessType is allow or deny, and a deny beats every allow,
an inherited one included. Answers 201 with the grant, plus whether it
changes anything today: an edit grant to a group whose members are all
Viewers is stored and does nothing until one of them becomes a Creator.
expiresAt ends the grant at that instant: from then on it gives and
refuses nothing and is no longer listed, with nothing else to do; the
account's admins are told a week before. Granting the same thing again
replaces the end date with the one that call states (none, if absent),
which is how an end date is moved or lifted.
Only an account admin or the folder's owner may grant. A principal that does not exist in this account answers 404.
Request
Responses
- 201
- 404
- 422
Successful Response
Not found
Validation Error