pydo.registry.list_garbage_collections()

Description

To get information about past garbage collections for a registry, send a GET request to /v2/registry/$REGISTRY_NAME/garbage-collections.

Parameters

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

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.registry.list_garbage_collections(registry_name="example")

Responses

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.

Click to expand an example response.
{
  "garbage_collections": [
    {
      "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8",
      "registry_name": "example",
      "status": "requested",
      "created_at": "2020-10-30T21:03:24.000Z",
      "updated_at": "2020-10-30T21:03:44.000Z",
      "blobs_deleted": 42,
      "freed_bytes": 667
    }
  ],
  "meta": {
    "total": 1
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}