To get information about past garbage collections for a registry, send a GET request to /v2/registry/$REGISTRY_NAME/garbage-collections
.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
registry_name |
string | True | The name of a container registry. | |
per_page |
integer | False | Number of items returned per page | 20 |
page |
integer | False | Which ‘page’ of paginated results to return. | 1 |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.registry.list_garbage_collections(registry_name="example")
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.
The response will be a JSON object with a key of garbage_collections
. This will be set to an array containing objects representing each past garbage collection. Each will contain the standard Garbage Collection attributes.
Unauthorized
The resource was not found.
API Rate limit exceeded
Server error.
Unexpected error