Skip to navigation

Get effective access on an asset

Beta

Read the access that you, or another user, have on an asset, and every grant that gives it. The level is what Athena’s permission checks decide for the user in the asset’s own workspace, whichever workspace is active for your key: ‘view’ can open the asset, ‘edit’ can also change it and manage its sharing, ‘owner’ created it and can edit it, and ‘none’ cannot open it. Each source names one grant: ‘owner’, ‘direct’ (shared with the user), ‘group’ (shared with a workspace group the user belongs to), ‘workspace’ (shared with the whole workspace), ‘drive’ (a role on the drive) or ‘other’ (access the share list does not hold, for example an environment admin). A folder’s sharing reaches each asset inside it as that asset’s own share, so a ‘workspace’ source on a sub-folder shows that a share of its parent folder reached it. Without user_id the route reads your own access; you need view access to the asset and membership in its workspace. To read another user’s access, pass their user_id; you need edit access to the asset, as for sharing it. A user who is not a member of the asset’s workspace, or who does not exist, reads as ‘none’ with is_member false. A suspended member reads as ‘none’ with no sources, and is_member still reports their membership. When a permission check cannot be answered (for example on an asset in a drive while the authorization service is unavailable), the route answers 503 and never a level. The route never changes a permission.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

asset_idstringRequired
Unique identifier of the asset

Headers

X-Athena-Session-CredentialstringOptional

Query parameters

user_idstring or nullOptional
The user whose access to read. Leave it out to read your own. Reading another user's access needs edit access to the asset.

Response

The user's effective access on the asset
asset_idstring
ID of the asset
is_memberboolean

Whether the user has an active membership in the asset’s workspace. A user who is not a member reads as ‘none’; the one exception is the workspace’s own external viewer, who can still open what is shared with them. A suspended member reads as ‘none’ with no sources, and this field still reports their membership.

levelenum

The access the user has, as Athena’s permission checks decide it: ‘view’ can open the asset, ‘edit’ can also change it and manage its sharing, ‘owner’ created it and can edit it, ‘none’ cannot open it. When a check refuses what a listed source grants, the level is lower than that source, and the level is what holds.

Allowed values:
sourceslist of objects
Every grant that contributes to the level
user_idstring
The user whose access was read
workspace_idstring or null
The workspace the asset belongs to

Errors

403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
503
Service Unavailable Error