Chapter 13. policy
13.1. createOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Creates an auto-prune policy for the organization
POST /api/v1/organization/{orgname}/autoprunepolicy/
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								orgname  |   The name of the organization  |   string  | 
Request body schema (application/json)
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema | 
|---|---|---|
|   
								method  |   The method to use for pruning tags (number_of_tags, creation_date)  |   string  | 
|   
								value  |   The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days))  | |
|   
								tagPattern  |   Tags only matching this pattern will be pruned  |   string  | 
|   
								tagPatternMatches  |   Determine whether pruned tags should or should not match the tagPattern  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X POST -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"method": "number_of_tags", "value": 10}' http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/
$ curl -X POST -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"method": "number_of_tags", "value": 10}' http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/
13.2. listOrganizationAutoPrunePolicies Copy linkLink copied to clipboard!
Lists the auto-prune policies for the organization
GET /api/v1/organization/{orgname}/autoprunepolicy/
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								orgname  |   The name of the organization  |   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 "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"
13.3. getOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Fetches the auto-prune policy for the organization
GET /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   string  | 
|   path  |   
								orgname  |   The name of the organization  |   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>" http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<policy_uuid>
$ curl -X GET -H "Authorization: Bearer <access_token>" http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<policy_uuid>
13.4. deleteOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Deletes the auto-prune policy for the organization
DELETE /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   string  | 
|   path  |   
								orgname  |   The name of the organization  |   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 "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/example_policy_uuid" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/example_policy_uuid" \
  -H "Authorization: Bearer <your_access_token>"
13.5. updateOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Updates the auto-prune policy for the organization
PUT /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (org:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   string  | 
|   path  |   
								orgname  |   The name of the organization  |   string  | 
Request body schema (application/json)
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema | 
|---|---|---|
|   
								method  |   The method to use for pruning tags (number_of_tags, creation_date)  |   string  | 
|   
								value  |   The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days))  | |
|   
								tagPattern  |   Tags only matching this pattern will be pruned  |   string  | 
|   
								tagPatternMatches  |   Determine whether pruned tags should or should not match the tagPattern  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   204  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
13.6. createRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Creates an auto-prune policy for the repository
POST /api/v1/repository/{repository}/autoprunepolicy/
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)
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema | 
|---|---|---|
|   
								method  |   The method to use for pruning tags (number_of_tags, creation_date)  |   string  | 
|   
								value  |   The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days))  | |
|   
								tagPattern  |   Tags only matching this pattern will be pruned  |   string  | 
|   
								tagPatternMatches  |   Determine whether pruned tags should or should not match the tagPattern  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X POST -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"method": "number_of_tags","value": 2}' http://<quay-server.example.com>/api/v1/repository/<organization_name>/<repository_name>/autoprunepolicy/
$ curl -X POST -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"method": "number_of_tags","value": 2}' http://<quay-server.example.com>/api/v1/repository/<organization_name>/<repository_name>/autoprunepolicy/
13.7. listRepositoryAutoPrunePolicies Copy linkLink copied to clipboard!
Lists the auto-prune policies for the repository
GET /api/v1/repository/{repository}/autoprunepolicy/
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 | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"
13.8. getRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Fetches the auto-prune policy for the repository
GET /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (repo:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   string  | 
|   path  |   
								repository  |   The full path of the repository. e.g. namespace/name  |   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 "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/123e4567-e89b-12d3-a456-426614174000" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer <your_access_token>"
13.9. deleteRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Deletes the auto-prune policy for the repository
DELETE /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (repo:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   string  | 
|   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 "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/123e4567-e89b-12d3-a456-426614174000" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer <your_access_token>"
13.10. updateRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Updates the auto-prune policy for the repository
PUT /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (repo:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   string  | 
|   path  |   
								repository  |   The full path of the repository. e.g. namespace/name  |   string  | 
Request body schema (application/json)
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema | 
|---|---|---|
|   
								method  |   The method to use for pruning tags (number_of_tags, creation_date)  |   string  | 
|   
								value  |   The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days))  | |
|   
								tagPattern  |   Tags only matching this pattern will be pruned  |   string  | 
|   
								tagPatternMatches  |   Determine whether pruned tags should or should not match the tagPattern  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   200  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
13.11. createUserAutoPrunePolicy Copy linkLink copied to clipboard!
Creates the auto-prune policy for the currently logged in user
POST /api/v1/user/autoprunepolicy/
Authorizations: oauth2_implicit (user:admin)
Request body schema (application/json)
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema | 
|---|---|---|
|   
								method  |   The method to use for pruning tags (number_of_tags, creation_date)  |   string  | 
|   
								value  |   The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days))  | |
|   
								tagPattern  |   Tags only matching this pattern will be pruned  |   string  | 
|   
								tagPatternMatches  |   Determine whether pruned tags should or should not match the tagPattern  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   201  |   Successful creation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  | 
Example command
13.12. listUserAutoPrunePolicies Copy linkLink copied to clipboard!
Lists the auto-prune policies for the currently logged in user
GET /api/v1/user/autoprunepolicy/
Authorizations: oauth2_implicit (user:admin)
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 "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"
13.13. getUserAutoPrunePolicy Copy linkLink copied to clipboard!
Fetches the auto-prune policy for the currently logged in user
GET /api/v1/user/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (user:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   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 "https://quay-server.example.com/api/v1/user/autoprunepolicy/{policy_uuid}" \
  -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/{policy_uuid}" \
  -H "Authorization: Bearer <your_access_token>"
13.14. deleteUserAutoPrunePolicy Copy linkLink copied to clipboard!
Deletes the auto-prune policy for the currently logged in user
DELETE /api/v1/user/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (user:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   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 "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \
  -H "Authorization: Bearer <your_access_token>"
13.15. updateUserAutoPrunePolicy Copy linkLink copied to clipboard!
Updates the auto-prune policy for the currently logged in user
PUT /api/v1/user/autoprunepolicy/{policy_uuid}
Authorizations: oauth2_implicit (user:admin)
Path parameters
| Type | Name | Description | Schema | 
|---|---|---|---|
|   path  |   
								policy_uuid  |   The unique ID of the policy  |   string  | 
Request body schema (application/json)
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema | 
|---|---|---|
|   
								method  |   The method to use for pruning tags (number_of_tags, creation_date)  |   string  | 
|   
								value  |   The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days))  | |
|   
								tagPattern  |   Tags only matching this pattern will be pruned  |   string  | 
|   
								tagPatternMatches  |   Determine whether pruned tags should or should not match the tagPattern  |   boolean  | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
|   204  |   Successful invocation  | |
|   400  |   Bad Request  | |
|   401  |   Session required  | |
|   403  |   Unauthorized access  | |
|   404  |   Not found  |