Access & Permissions API

Prefix: /api/v1/access Authentication: Required (Bearer token)


GET /api/v1/access/get/permission

Get the permission level a user or group has on a specific item.

Query Parameters

ParameterTypeRequiredDescription
item_lauistringYesItem to check permissions on
user_emailstringConditionalEmail of user to check (provide this or group_name)
group_namestringConditionalName of group to check (provide this or user_email)

At least one of user_email or group_name must be provided.

Variation 1: Check User Permission

GET /api/v1/access/get/permission?item_laui=507f1f77bcf86cd799439011&user_email=john@example.com

Variation 2: Check Group Permission

GET /api/v1/access/get/permission?item_laui=507f1f77bcf86cd799439011&group_name=data-engineers

Variation 3: Check Both User and Group

GET /api/v1/access/get/permission?item_laui=507f1f77bcf86cd799439011&user_email=john@example.com&group_name=data-engineers

Success Response

Status: 200 OK

{
  "permission": "edit",
  "user_laui": "60d5ecb54b24a67d8c8b4567",
  "group_laui": null
}

When checking a group:

{
  "permission": "view",
  "user_laui": null,
  "group_laui": "60d5ecb54b24a67d8c8b9012"
}

When no permission exists:

{
  "permission": "none",
  "user_laui": "60d5ecb54b24a67d8c8b4567",
  "group_laui": null
}

Permission Values

PermissionDescription
ownFull control — can view, edit, delete, and manage access
editCan view and modify the item
viewCan read the item
deleteCan delete the item
true_parent_editCan edit as the true parent
is_true_parentCheck for true parent relationship
noneNo permission

Error Responses

422 Unprocessable Entity — Neither user_email nor group_name provided

{"detail": "Either one of user_email or group_name must be passed"}

404 Not Found — User or group not found

{"detail": "User not found"}

500 Internal Server Error

{"detail": "Internal server error: <message>"}

GET /api/v1/access/get/users_groups

Get all access relations (users and groups) that the current authenticated user has access to.

Request Example

GET /api/v1/access/get/users_groups

No query parameters. Uses the authenticated user from the Bearer token.

Success Response

Status: 200 OK

[
  {
    "item_laui": "507f1f77bcf86cd799439011",
    "subject_laui": "60d5ecb54b24a67d8c8b4567",
    "subject_type": "user",
    "subject_permission": "own",
    "item_permission": "own"
  },
  {
    "item_laui": "507f1f77bcf86cd799439011",
    "subject_laui": "60d5ecb54b24a67d8c8b9012",
    "subject_type": "group",
    "subject_permission": "edit",
    "item_permission": "own"
  },
  {
    "item_laui": "60d5ecb54b24a67d8c8baaaa",
    "subject_laui": "60d5ecb54b24a67d8c8b4567",
    "subject_type": "user",
    "subject_permission": "view",
    "item_permission": "view"
  }
]

Response Fields

FieldTypeDescription
item_lauistringThe item's LAUI
subject_lauistringThe user or group LAUI
subject_typestring"user" or "group"
subject_permissionPermissionThe subject's permission on the item
item_permissionPermissionThe requesting user's permission on the item

Error Responses

401 Unauthorized — Not authenticated

{"detail": "Unauthorized"}

500 Internal Server Error

{"detail": "Internal server error: <message>"}

Relations vs Permissions

Relations define how subjects are connected to resources:

RelationDescription
ownersFull control members
editorsCan modify members
viewersRead-only members
true_parentPrimary parent relationship
false_parentsSecondary parent relationships
"" (empty)No specific relation
allAll relations

Permissions are derived from relations and define what actions are allowed:

PermissionDerived From
ownowners relation
editeditors relation (or higher)
viewviewers relation (or higher)
deleteowners relation
true_parent_edittrue_parent relation
is_true_parenttrue_parent relation