This page describes the access rights related REST endpoints. Please also take note of the general information on the REST API.
GET /access/?project={project-name}
Lists the access rights for projects. The projects for which the access rights should be returned must be specified as project
options. The project
can be specified multiple times.
As result a map is returned that maps the project name to ProjectAccessInfo entities.
The entries in the map are sorted by project name.
Request.
GET /access/?project=MyProject&project=All-Projects HTTP/1.0
Response.
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 )]}' { "All-Projects": { "revision": "edd453d18e08640e67a8c9a150cec998ed0ac9aa", "local": { "GLOBAL_CAPABILITIES": { "permissions": { "priority": { "rules": { "15bfcd8a6de1a69c50b30cedcdcc951c15703152": { "action": "BATCH" } } }, "streamEvents": { "rules": { "15bfcd8a6de1a69c50b30cedcdcc951c15703152": { "action": "ALLOW" } } }, "administrateServer": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" } } } } }, "refs/meta/config": { "permissions": { "submit": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } }, "label-Code-Review": { "label": "Code-Review", "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW", "min": -2, "max": 2 }, "global:Project-Owners": { "action": "ALLOW", "min": -2, "max": 2 } } }, "read": { "exclusive": true, "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } }, "push": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } } } }, "refs/for/refs/*": { "permissions": { "pushMerge": { "rules": { "global:Registered-Users": { "action": "ALLOW" } } }, "push": { "rules": { "global:Registered-Users": { "action": "ALLOW" } } } } }, "refs/tags/*": { "permissions": { "createSignedTag": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } }, "createTag": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } } } }, "refs/heads/*": { "permissions": { "forgeCommitter": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } }, "forgeAuthor": { "rules": { "global:Registered-Users": { "action": "ALLOW" } } }, "submit": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } }, "editTopicName": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW", "force": true }, "global:Project-Owners": { "action": "ALLOW", "force": true } } }, "label-Code-Review": { "label": "Code-Review", "rules": { "global:Registered-Users": { "action": "ALLOW", "min": -1, "max": 1 }, "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW", "min": -2, "max": 2 }, "global:Project-Owners": { "action": "ALLOW", "min": -2, "max": 2 } } }, "create": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } }, "push": { "rules": { "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" }, "global:Project-Owners": { "action": "ALLOW" } } } } }, "refs/*": { "permissions": { "read": { "rules": { "global:Anonymous-Users": { "action": "ALLOW" }, "53a4f647a89ea57992571187d8025f830625192a": { "action": "ALLOW" } } } } } }, "is_owner": true, "owner_of": [ "GLOBAL_CAPABILITIES", "refs/meta/config", "refs/for/refs/*", "refs/tags/*", "refs/heads/*", "refs/*" ], "can_upload": true, "can_add": true, "config_visible": true, "groups": { "53a4f647a89ea57992571187d8025f830625192a": { "url": "#/admin/groups/uuid-53a4f647a89ea57992571187d8025f830625192a", "options": {}, "description": "Gerrit Site Administrators", "group_id": 1, "owner": "Administrators", "owner_id": "53a4f647a89ea57992571187d8025f830625192a", "created_on": "2009-06-08 23:31:00.000000000", "name": "Administrators" }, "global:Registered-Users": { "options": {}, "name": "Registered Users" }, "global:Project-Owners": { "options": {}, "name": "Project Owners" }, "15bfcd8a6de1a69c50b30cedcdcc951c15703152": { "url": "#/admin/groups/uuid-15bfcd8a6de1a69c50b30cedcdcc951c15703152", "options": {}, "description": "Users who perform batch actions on Gerrit", "group_id": 2, "owner": "Administrators", "owner_id": "53a4f647a89ea57992571187d8025f830625192a", "created_on": "2009-06-08 23:31:00.000000000", "name": "Non-Interactive Users" }, "global:Anonymous-Users": { "options": {}, "name": "Anonymous Users" } } }, "MyProject": { "revision": "61157ed63e14d261b6dca40650472a9b0bd88474", "inherits_from": { "id": "All-Projects", "name": "All-Projects", "description": "Access inherited by all other projects." }, "local": {}, "is_owner": true, "owner_of": [ "refs/*" ], "can_upload": true, "can_add": true, "config_visible": true } }
The AccessSectionInfo
describes the access rights that are assigned on a ref.
The PermissionInfo
entity contains information about an assigned permission.
The PermissionRuleInfo
entity contains information about a permission rule that is assigned to group.
The ProjectAccessInfo
entity contains information about the access rights for a project.
Part of Gerrit Code Review