v1

latestOpenAPI 3.0.32026-07-22115106141.4 KB
Repository Granular Permissions

Create a path permission

Create a new path permission rule for this repository

post/repos/{repo_id}/granular-permissions

Request body

user_idstring

User ID to assign this permission to (mutually exclusive with group_id)

group_idstring

Group ID to assign this permission to (mutually exclusive with user_id)

path_patternstring required

Path pattern for matching files. Supports wildcards: "/path/to/file" for exact match, "/path/..." for recursive wildcard, "/path/*.ext" for extension matching.

access_level'ADMIN' | 'WRITE' | 'READ' | 'NO_ACCESS' required

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

permission_type'ALLOW_LT_EQ' | 'ALLOW_EQ' | 'DENY_ALL' | 'DENY_EQ' 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.

insert_above_rule_idstring

Optional. ID of an existing rule to insert this rule above (lower evaluation_order). If not provided, the rule is added at the top (highest evaluation_order/priority).

Response

Resource created

idstring required

The id of the newly created resource

Example response

{
  "id": "example_id"
}