3.2. Adjusting repository visibility by using the API
The visibility of your repository can be set to private or public by using the POST /api/v1/repository/{repository}/changevisibility command.
Prerequisites
- You have Created an OAuth access token.
- You have created a repository.
Procedure
You can change the visibility of your repository to public or private by specifying the desired option in the
visibilityschema. For example:$ curl -X POST \ -H "Authorization: Bearer <bearer_token>" \ -H "Content-Type: application/json" \ -d '{ "visibility": "private" }' \ "https://quay-server.example.com/api/v1/repository/my_namespace/test_repo_three/changevisibility"Example output
{"success": true}