Chapter 16. repository
List, create and manage repositories.
16.1. createRepo Copy linkLink copied to clipboard!
Create a new repository.
POST /api/v1/repository
Authorizations: oauth2_implicit (repo:create)
Request body schema (application/json)
Description of a new repository
| Name | Description | Schema | 
|---|---|---|
|   
								repository  |   Repository name  |   string  | 
|   
								visibility  |   Visibility which the repository will start with  |   string  | 
|   
								namespace  |   Namespace in which the repository should be created. If omitted, the username of the caller is used  |   string  | 
|   
								description  |   Markdown encoded description for the repository  |   string  | 
|   
								repo_kind  |   The kind of repository  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
16.2. listRepos Copy linkLink copied to clipboard!
Fetch the list of repositories visible to the current user under a variety of situations.
GET /api/v1/repository
Authorizations: oauth2_implicit (repo:read)
Query parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   query  |   
								next_page  |   The page token for the next page  |   string  | 
|   query  |   
								repo_kind  |   The kind of repositories to return  |   string  | 
|   query  |   
								popularity  |   Whether to include the repository’s popularity metric.  |   boolean  | 
|   query  |   
								last_modified  |   Whether to include when the repository was last modified.  |   boolean  | 
|   query  |   
								public  |   Adds any repositories visible to the user by virtue of being public  |   boolean  | 
|   query  |   
								starred  |   Filters the repositories returned to those starred by the user  |   boolean  | 
|   query  |   
								namespace  |   Filters the repositories returned to this namespace  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ "https://quay-server.example.com/api/v1/repository?public=true&starred=false&namespace=<NAMESPACE>"
$ curl -X GET \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  "https://quay-server.example.com/api/v1/repository?public=true&starred=false&namespace=<NAMESPACE>"
16.3. changeRepoVisibility Copy linkLink copied to clipboard!
Change the visibility of a repository.
POST /api/v1/repository/{repository}/changevisibility
Authorizations: oauth2_implicit (repo:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								repository  |   The full path of the repository. e.g. namespace/name  |   string  | 
Request body schema (application/json)
Change the visibility for the repository.
| Name | Description | Schema | 
|---|---|---|
|   
								visibility  |   Visibility which the repository will start with  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example Command
16.4. changeRepoState Copy linkLink copied to clipboard!
Change the state of a repository.
PUT /api/v1/repository/{repository}/changestate
Authorizations: oauth2_implicit (repo:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								repository  |   The full path of the repository. e.g. namespace/name  |   string  | 
Request body schema (application/json)
Change the state of the repository.
| Name | Description | Schema | 
|---|---|---|
|   
								state  |   Determines whether pushes are allowed.  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
16.5. getRepo Copy linkLink copied to clipboard!
Fetch the specified repository.
GET /api/v1/repository/{repository}
Authorizations: oauth2_implicit (repo:read)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								repository  |   The full path of the repository. e.g. namespace/name  |   string  | 
Query parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   query  |   
								includeTags  |   Whether to include repository tags  |   boolean  | 
|   query  |   
								includeStats  |   Whether to include action statistics  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
16.6. updateRepo Copy linkLink copied to clipboard!
Update the description in the specified repository.
PUT /api/v1/repository/{repository}
Authorizations: oauth2_implicit (repo:write)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								repository  |   The full path of the repository. e.g. namespace/name  |   string  | 
Request body schema (application/json)
Fields which can be updated in a repository.
| Name | Description | Schema | 
|---|---|---|
|   
								description  |   Markdown encoded description for the repository  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
16.7. deleteRepository Copy linkLink copied to clipboard!
Delete a repository.
DELETE /api/v1/repository/{repository}
Authorizations: oauth2_implicit (repo:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								repository  |   The full path of the repository. e.g. namespace/name  |   string  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   204  |   Deleted  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X DELETE -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
$ curl -X DELETE   -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"