Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 13. policy


13.1. createOrganizationAutoPrunePolicy

Creates an auto-prune policy for the organization

POST /api/v1/organization/{orgname}/autoprunepolicy/

Authorizations: oauth2_implicit (org:admin)

Path parameters

Expand
TypeNameDescriptionSchema

path

orgname
required

The name of the organization

string

Request body schema (application/json)

The policy configuration that is to be applied to the user namespace

Expand
NameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

201

Successful creation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

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/
Copy to Clipboard Toggle word wrap

13.2. listOrganizationAutoPrunePolicies

Lists the auto-prune policies for the organization

GET /api/v1/organization/{orgname}/autoprunepolicy/

Authorizations: oauth2_implicit (org:admin)

Path parameters

Expand
TypeNameDescriptionSchema

path

orgname
required

The name of the organization

string

Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ curl -X GET "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"
Copy to Clipboard Toggle word wrap

13.3. getOrganizationAutoPrunePolicy

Fetches the auto-prune policy for the organization

GET /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}

Authorizations: oauth2_implicit (org:admin)

Path parameters

Expand
TypeNameDescriptionSchema

path

policy_uuid
required

The unique ID of the policy

string

path

orgname
required

The name of the organization

string

Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ curl -X GET -H "Authorization: Bearer <access_token>" http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<policy_uuid>
Copy to Clipboard Toggle word wrap

13.4. deleteOrganizationAutoPrunePolicy

Deletes the auto-prune policy for the organization

DELETE /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}

Authorizations: oauth2_implicit (org:admin)

Path parameters

Expand
TypeNameDescriptionSchema

path

policy_uuid
required

The unique ID of the policy

string

path

orgname
required

The name of the organization

string

Responses

Expand
HTTP CodeDescriptionSchema

204

Deleted

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

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>"
Copy to Clipboard Toggle word wrap

13.5. updateOrganizationAutoPrunePolicy

Updates the auto-prune policy for the organization

PUT /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}

Authorizations: oauth2_implicit (org:admin)

Path parameters

Expand
TypeNameDescriptionSchema

path

policy_uuid
required

The unique ID of the policy

string

path

orgname
required

The name of the organization

string

Request body schema (application/json)

The policy configuration that is to be applied to the user namespace

Expand
NameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

204

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ 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>"
Copy to Clipboard Toggle word wrap

13.6. createRepositoryAutoPrunePolicy

Creates an auto-prune policy for the repository

POST /api/v1/repository/{repository}/autoprunepolicy/

Authorizations: oauth2_implicit (repo:admin)

Path parameters

Expand
TypeNameDescriptionSchema

path

repository
required

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

Expand
NameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

201

Successful creation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

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/
Copy to Clipboard Toggle word wrap

13.7. listRepositoryAutoPrunePolicies

Lists the auto-prune policies for the repository

GET /api/v1/repository/{repository}/autoprunepolicy/

Authorizations: oauth2_implicit (repo:admin)

Path parameters

Expand
TypeNameDescriptionSchema

path

repository
required

The full path of the repository. e.g. namespace/name

string

Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"
Copy to Clipboard Toggle word wrap

13.8. getRepositoryAutoPrunePolicy

Fetches the auto-prune policy for the repository

GET /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}

Authorizations: oauth2_implicit (repo:admin)

Path parameters

Expand
TypeNameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

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>"
Copy to Clipboard Toggle word wrap

13.9. deleteRepositoryAutoPrunePolicy

Deletes the auto-prune policy for the repository

DELETE /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}

Authorizations: oauth2_implicit (repo:admin)

Path parameters

Expand
TypeNameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

204

Deleted

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

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>"
Copy to Clipboard Toggle word wrap

13.10. updateRepositoryAutoPrunePolicy

Updates the auto-prune policy for the repository

PUT /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}

Authorizations: oauth2_implicit (repo:admin)

Path parameters

Expand
TypeNameDescriptionSchema

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

Request body schema (application/json)

The policy configuration that is to be applied to the user namespace

Expand
NameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ 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>"
Copy to Clipboard Toggle word wrap

13.11. createUserAutoPrunePolicy

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

Expand
NameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

201

Successful creation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ 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
  }'
Copy to Clipboard Toggle word wrap

13.12. listUserAutoPrunePolicies

Lists the auto-prune policies for the currently logged in user

GET /api/v1/user/autoprunepolicy/

Authorizations: oauth2_implicit (user:admin)

Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"
Copy to Clipboard Toggle word wrap

13.13. getUserAutoPrunePolicy

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

Expand
TypeNameDescriptionSchema

path

policy_uuid
required

The unique ID of the policy

string

Responses

Expand
HTTP CodeDescriptionSchema

200

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/{policy_uuid}" \
  -H "Authorization: Bearer <your_access_token>"
Copy to Clipboard Toggle word wrap

13.14. deleteUserAutoPrunePolicy

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

Expand
TypeNameDescriptionSchema

path

policy_uuid
required

The unique ID of the policy

string

Responses

Expand
HTTP CodeDescriptionSchema

204

Deleted

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ curl -X DELETE "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \
  -H "Authorization: Bearer <your_access_token>"
Copy to Clipboard Toggle word wrap

13.15. updateUserAutoPrunePolicy

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

Expand
TypeNameDescriptionSchema

path

policy_uuid
required

The unique ID of the policy

string

Request body schema (application/json)

The policy configuration that is to be applied to the user namespace

Expand
NameDescriptionSchema

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

Responses

Expand
HTTP CodeDescriptionSchema

204

Successful invocation

 

400

Bad Request

ApiError

401

Session required

ApiError

403

Unauthorized access

ApiError

404

Not found

ApiError

Example command

$ 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
  }'
Copy to Clipboard Toggle word wrap
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat