Skip to content

Instantly share code, notes, and snippets.

View egenc's full-sized avatar

egenc

View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active July 18, 2024 17:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

#!/usr/bin/env bash
NAMESPACE=your_namespace_on_quay
TAG=the_tag
# https://quay.io/organization/your_namespace_on_quay?tab=applications
ACCESS_TOKEN=xxxxx
for repository in $(curl -s -X GET -H "Authorization: Bearer $ACCESS_TOKEN" "https://quay.io/api/v1/repository?namespace=$NAMESPACE" | jq -r '.repositories[].name' | sort); do
curl -s -X DELETE -H "Authorization: Bearer $ACCESS_TOKEN" https://quay.io/api/v1/repository/$NAMESPACE/$repository/tag/$TAG