We use cookies to understand how people use Depot.
👩‍🚀 Introducing Depot Registry
← Back to changelog

We've added the ability to list and delete images from the API.

To list images in a project:

const headers = {Authorization: `Bearer ${process.env.DEPOT_TOKEN}`}

const result = await depot.build.v1.RegistryService.listImages(
  {projectId: 'project-id', pageSize: 100, pageToken: undefined},
  {headers},
)

console.log(result.images)
console.log(result.nextPageToken)

To delete images:

const headers = {Authorization: `Bearer ${process.env.DEPOT_TOKEN}`}

await depot.build.v1.RegistryService.deleteImages(
  {projectId: 'project-id', imageTags: ['image-tag-1', 'image-tag-2']},
  {headers},
)

See our API reference for docs on all of the Depot API endpoints.