Chapter 17. policy
Policy.
17.1. createOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Creates an auto-prune policy for the organization
17.1.1. POST /api/v1/organization/{orgname}/autoprunepolicy/ Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (org:admin)
17.1.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | orgname required | The name of the organization | string |
17.1.3. Request body schema (application/json) Copy linkLink copied to clipboard!
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema |
|---|---|---|
| method required | The method to use for pruning tags (number_of_tags, creation_date) | string |
| value required | The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days)) | |
| tagPattern optional | Tags only matching this pattern will be pruned | string |
| tagPatternMatches optional | Determine whether pruned tags should or should not match the tagPattern | boolean |
17.1.4. Responses Copy linkLink copied to clipboard!
17.1.5. Example command Copy linkLink copied to clipboard!
$ 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/
17.2. listOrganizationAutoPrunePolicies Copy linkLink copied to clipboard!
Lists the auto-prune policies for the organization
17.2.1. GET /api/v1/organization/{orgname}/autoprunepolicy/ Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (org:admin)
17.2.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | orgname required | The name of the organization | string |
17.2.3. Responses Copy linkLink copied to clipboard!
17.2.4. Example command Copy linkLink copied to clipboard!
$ curl -X GET "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/" \
-H "Authorization: Bearer <your_access_token>"
17.3. getOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Fetches the auto-prune policy for the organization
17.3.1. GET /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (org:admin)
17.3.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
| path | orgname required | The name of the organization | string |
17.3.3. Responses Copy linkLink copied to clipboard!
17.3.4. Example command Copy linkLink copied to clipboard!
$ curl -X GET -H "Authorization: Bearer <access_token>" http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<policy_uuid>
17.4. deleteOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Deletes the auto-prune policy for the organization
17.4.1. DELETE /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (org:admin)
17.4.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
| path | orgname required | The name of the organization | string |
17.4.3. Responses Copy linkLink copied to clipboard!
17.4.4. Example command Copy linkLink copied to clipboard!
$ curl -X DELETE "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/example_policy_uuid" \
-H "Authorization: Bearer <your_access_token>"
17.5. updateOrganizationAutoPrunePolicy Copy linkLink copied to clipboard!
Updates the auto-prune policy for the organization
17.5.1. PUT /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (org:admin)
17.5.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
| path | orgname required | The name of the organization | string |
17.5.3. Request body schema (application/json) Copy linkLink copied to clipboard!
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema |
|---|---|---|
| method required | The method to use for pruning tags (number_of_tags, creation_date) | string |
| value required | The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days)) | |
| tagPattern optional | Tags only matching this pattern will be pruned | string |
| tagPatternMatches optional | Determine whether pruned tags should or should not match the tagPattern | boolean |
17.5.4. Responses Copy linkLink copied to clipboard!
17.5.5. Example command Copy linkLink copied to clipboard!
$ curl -X PUT -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json" -d '{
"method": "creation_date",
"value": "4d",
"tagPattern": "^v*",
"tagPatternMatches": true
}' "<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<uuid>"
17.6. createRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Creates an auto-prune policy for the repository
17.6.1. POST /api/v1/repository/{repository}/autoprunepolicy/ Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (repo:admin)
17.6.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | repository required | The full path of the repository. e.g. namespace/name | string |
17.6.3. Request body schema (application/json) Copy linkLink copied to clipboard!
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema |
|---|---|---|
| method required | The method to use for pruning tags (number_of_tags, creation_date) | string |
| value required | The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days)) | |
| tagPattern optional | Tags only matching this pattern will be pruned | string |
| tagPatternMatches optional | Determine whether pruned tags should or should not match the tagPattern | boolean |
17.6.4. Responses Copy linkLink copied to clipboard!
17.6.5. Example command Copy linkLink copied to clipboard!
$ 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/
17.7. listRepositoryAutoPrunePolicies Copy linkLink copied to clipboard!
Lists the auto-prune policies for the repository
17.7.1. GET /api/v1/repository/{repository}/autoprunepolicy/ Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (repo:admin)
17.7.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | repository required | The full path of the repository. e.g. namespace/name | string |
17.7.3. Responses Copy linkLink copied to clipboard!
17.7.4. Example command Copy linkLink copied to clipboard!
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/" \
-H "Authorization: Bearer <your_access_token>"
17.8. getRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Fetches the auto-prune policy for the repository
17.8.1. GET /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (repo:admin)
17.8.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
| path | repository required | The full path of the repository. e.g. namespace/name | string |
17.8.3. Responses Copy linkLink copied to clipboard!
17.8.4. Example command Copy linkLink copied to clipboard!
$ 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>"
17.9. deleteRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Deletes the auto-prune policy for the repository
17.9.1. DELETE /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (repo:admin)
17.9.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
| path | repository required | The full path of the repository. e.g. namespace/name | string |
17.9.3. Responses Copy linkLink copied to clipboard!
17.9.4. Example command Copy linkLink copied to clipboard!
$ 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>"
17.10. updateRepositoryAutoPrunePolicy Copy linkLink copied to clipboard!
Updates the auto-prune policy for the repository
17.10.1. PUT /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (repo:admin)
17.10.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
| path | repository required | The full path of the repository. e.g. namespace/name | string |
17.10.3. Request body schema (application/json) Copy linkLink copied to clipboard!
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema |
|---|---|---|
| method required | The method to use for pruning tags (number_of_tags, creation_date) | string |
| value required | The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days)) | |
| tagPattern optional | Tags only matching this pattern will be pruned | string |
| tagPatternMatches optional | Determine whether pruned tags should or should not match the tagPattern | boolean |
17.10.4. Responses Copy linkLink copied to clipboard!
17.10.5. Example command Copy linkLink copied to clipboard!
$ curl -X PUT \
-H "Authorization: Bearer <bearer_token>" \
-H "Content-Type: application/json" \
-d '{
"method": "number_of_tags",
"value": "5",
"tagPattern": "^test.*",
"tagPatternMatches": true
}' \
"https://quay-server.example.com/api/v1/repository/<namespace>/<repo_name>/autoprunepolicy/<uuid>"
17.11. createUserAutoPrunePolicy Copy linkLink copied to clipboard!
Creates the auto-prune policy for the currently logged in user
17.11.1. POST /api/v1/user/autoprunepolicy/ Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (user:admin)
17.11.2. Request body schema (application/json) Copy linkLink copied to clipboard!
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema |
|---|---|---|
| method required | The method to use for pruning tags (number_of_tags, creation_date) | string |
| value required | The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days)) | |
| tagPattern optional | Tags only matching this pattern will be pruned | string |
| tagPatternMatches optional | Determine whether pruned tags should or should not match the tagPattern | boolean |
17.11.3. Responses Copy linkLink copied to clipboard!
17.11.4. Example command Copy linkLink copied to clipboard!
$ curl -X POST "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"method": "number_of_tags",
"value": 10,
"tagPattern": "v*",
"tagPatternMatches": true
}'
17.12. listUserAutoPrunePolicies Copy linkLink copied to clipboard!
Lists the auto-prune policies for the currently logged in user
17.12.1. GET /api/v1/user/autoprunepolicy/ Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (user:admin)
17.12.2. Responses Copy linkLink copied to clipboard!
17.12.3. Example command Copy linkLink copied to clipboard!
$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \
-H "Authorization: Bearer <your_access_token>"
17.13. getUserAutoPrunePolicy Copy linkLink copied to clipboard!
Fetches the auto-prune policy for the currently logged in user
17.13.1. GET /api/v1/user/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (user:admin)
17.13.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
17.13.3. Responses Copy linkLink copied to clipboard!
17.13.4. Example command Copy linkLink copied to clipboard!
$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/{policy_uuid}" \
-H "Authorization: Bearer <your_access_token>"
17.14. deleteUserAutoPrunePolicy Copy linkLink copied to clipboard!
Deletes the auto-prune policy for the currently logged in user
17.14.1. DELETE /api/v1/user/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (user:admin)
17.14.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
17.14.3. Responses Copy linkLink copied to clipboard!
17.14.4. Example command Copy linkLink copied to clipboard!
$ curl -X DELETE "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \
-H "Authorization: Bearer <your_access_token>"
17.15. updateUserAutoPrunePolicy Copy linkLink copied to clipboard!
Updates the auto-prune policy for the currently logged in user
17.15.1. PUT /api/v1/user/autoprunepolicy/{policy_uuid} Copy linkLink copied to clipboard!
Authorizations: oauth2_implicit (user:admin)
17.15.2. Path parameters Copy linkLink copied to clipboard!
| Type | Name | Description | Schema |
|---|---|---|---|
| path | policy_uuid required | The unique ID of the policy | string |
17.15.3. Request body schema (application/json) Copy linkLink copied to clipboard!
The policy configuration that is to be applied to the user namespace
| Name | Description | Schema |
|---|---|---|
| method required | The method to use for pruning tags (number_of_tags, creation_date) | string |
| value required | The value to use for the pruning method (number of tags e.g. 10, time delta e.g. 7d (7 days)) | |
| tagPattern optional | Tags only matching this pattern will be pruned | string |
| tagPatternMatches optional | Determine whether pruned tags should or should not match the tagPattern | boolean |
17.15.4. Responses Copy linkLink copied to clipboard!
17.15.5. Example command Copy linkLink copied to clipboard!
$ curl -X PUT "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"method": "number_of_tags",
"value": "10",
"tagPattern": ".*-old",
"tagPatternMatches": true
}'