Skip to main content
GET
/
repos
/
{repo_id}
/
granular-permissions
/
{permission_id}
Get path permission details
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/granular-permissions/{permission_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "repo_id": "<string>",
  "path_pattern": "<string>",
  "access_level": "ADMIN",
  "permission_type": "ALLOW_LT_EQ",
  "evaluation_order": 123,
  "created_unix": 123,
  "updated_unix": 123,
  "created_by": "<string>",
  "last_updated_by": "<string>",
  "user_id": "<string>",
  "group_id": "<string>"
}

Authorizations

Authorization
string
header
required

This API uses OAuth 2 with the implicit grant flow

Path Parameters

repo_id
string
required

The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.

Required string length: 3 - 128
Example:

"example_id"

permission_id
string
required

Permission identifier

Required string length: 3 - 128
Example:

"dv.perm.12a37e91-bfc4-4e03-a330-13b5b84ab7cb"

Response

Path permission details returned

id
string
required

Granular permission identifier

repo_id
string
required

Repository ID this permission belongs to

path_pattern
string
required

Path pattern for matching files

access_level
enum<string>
required

Access level for path permissions. Hierarchical: ADMIN > WRITE > READ > NO_ACCESS.

Available options:
ADMIN,
WRITE,
READ,
NO_ACCESS
permission_type
enum<string>
required

Permission type controlling how access levels are granted or denied. ALLOW_LT_EQ grants specified level and all lower levels. ALLOW_EQ grants only the exact level. DENY_ALL denies all level granted above in the table. DENY_EQ denies only the exact level.

Available options:
ALLOW_LT_EQ,
ALLOW_EQ,
DENY_ALL,
DENY_EQ
evaluation_order
integer
required

Rule evaluation priority. Higher values are evaluated first (read-only).

created_unix
integer<int64>
required

Creation timestamp (Unix epoch)

updated_unix
integer<int64>
required

Last update timestamp (Unix epoch)

created_by
string
required

User ID who created this permission

last_updated_by
string
required

User ID who last updated this permission

user_id
string

User ID this permission is assigned to

group_id
string

Group ID this permission is assigned to