6.11. Managing repository permissions by using the Red Hat Quay API


Repository permissions can be managed by using the Red Hat Quay API. For example, you can create, view, and delete user and team permissions.

The following procedures show you how to manage repository permissions by using the Red Hat Quay API.

6.11.1. Managing user permissions by using the Red Hat Quay API

Use the following procedure to manage user permissions by using the Red Hat Quay API.

Procedure

  1. Use the GET /api/v1/repository/{repository}/permissions/user/{username} endpoint to obtain repository permissions for a user. For example:

    $ curl -X GET \
      -H "Authorization: Bearer <access_token>" \
      "https://quay-server.example.com/api/v1/repository/<repository_path>/permissions/user/<username>"

    Example output

    $ {"role": "read", "name": "testuser", "is_robot": false, "avatar": {"name": "testuser", "hash": "f660ab912ec121d1b1e928a0bb4bc61b15f5ad44d5efdc4e1c92a25e99b8e44a", "color": "#6b6ecf", "kind": "user"}, "is_org_member": false}

  2. All user permissions can be returned with the GET /api/v1/repository/{repository}/permissions/user/ endpoint:

    $ curl -X GET \
      -H "Authorization: Bearer <access_token>" \
      "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/user/"

    Example output

    {"permissions": {"quayadmin": {"role": "admin", "name": "quayadmin", "is_robot": false, "avatar": {"name": "quayadmin", "hash": "6d640d802fe23b93779b987c187a4b7a4d8fbcbd4febe7009bdff58d84498fba", "color": "#f7b6d2", "kind": "user"}, "is_org_member": true}, "test+example": {"role": "admin", "name": "test+example", "is_robot": true, "avatar": {"name": "test+example", "hash": "3b03050c26e900500437beee4f7f2a5855ca7e7c5eab4623a023ee613565a60e", "color": "#a1d99b", "kind": "robot"}, "is_org_member": true}}}

  3. Alternatively, you can use the GET /api/v1/repository/{repository}/permissions/user/{username}/transitive endpoint to return only the repository permission for the user:

    $ curl -X GET \
      -H "Authorization: Bearer <access_token>" \
      "https://quay-server.example.com/api/v1/repository/<repository_path>/permissions/user/<username>/transitive"

    Example output

    {"permissions": [{"role": "admin"}]}

  4. You can change the user’s permissions, such as making the user an admin by using the PUT /api/v1/repository/{repository}/permissions/user/{username} endpoint. For example:

    $ curl -X PUT \
      -H "Authorization: Bearer <access_token>" \
      -H "Content-Type: application/json" \
      -d '{"role": "<role>"}' \
      "https://quay-server.example.com/api/v1/repository/<repository_path>/permissions/user/<username>"

    Example output

    {"role": "admin", "name": "testuser", "is_robot": false, "avatar": {"name": "testuser", "hash": "f660ab912ec121d1b1e928a0bb4bc61b15f5ad44d5efdc4e1c92a25e99b8e44a", "color": "#6b6ecf", "kind": "user"}, "is_org_member": false}

  5. User permissions can be deleted by using the DELETE /api/v1/repository/{repository}/permissions/user/{username} endpoint. For example:

    $ curl -X DELETE \
      -H "Authorization: Bearer <access_token>" \
      "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/user/<username>"

    This command does not return output.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동