Rolemaps
Last updated
Last updated
Rolemaps are join objects that relate users to Workspaces, folders, or files. A rolemap grants a user access to an object via a role. You can read, update, delete, and list rolemaps.
You create rolemaps via invitations.
Interacting with the rolemaps endpoint requires the id
for a specific rolemap. You can find the appropriate rolemap id
by first listing all rolemaps for a given object.
GET
https://ws-api.onehub.com/rolemaps/:id
Retrieves the rolemap specified via :id
.
Name | Type | Description |
---|---|---|
Rolemaps with an object_type
of Account
were automatically granted to an account-level user and indicate access to all other object types within the account. Whereas, Workspace
, Folder
, and File
rolemaps indicate access only to the object retrieved.
PUT
https://ws-api.onehub.com/rolemaps/:id
Updates the rolemap specified via :id
.
Endpoint context is assumed for all update actions. If you update an Account
rolemap from the /workspaces
endpoint, the API will automatically create a new Workspace
rolemap on the specified Workspace, versus modifying that user’s account role.
DELETE
https://ws-api.onehub.com/rolemaps/:id
Deletes the rolemap specified via :id
.
Deleting a rolemap will revoke access to the rolemap's object.
Endpoint context is assumed for all delete actions. If you attempt to delete an Account
rolemap from the /workspaces
endpoint, the call will fail.
GET
https://ws-api.onehub.com/:object/:id/rolemaps
Lists all rolemaps for the :object
(Workspace, folder, or file) specified via :id
.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
:id
integer
The unique identifier of the rolemap you would like to retrieve.
:id
integer
The unique identifier of the rolemap you would like to update.
role_name
string
The effective role granted to the user. This can only be updated to one of the available_roles
.
:id
integer
The unique identifier of the rolemap you would like to delete.
:object
string
The type of object. Can be either workspaces
, folders
, or files
.
:id
integer
The unique identifier of the object that you would like to list rolemaps from.