Bulk delete container tags via api
tags count:
curl --header "PRIVATE-TOKEN: $PRIVATE_TOKEN" https://gitlab.com/api/v4/registry/repositories/$REPO_ID?tags_count=true | jq .tags_count
=> 4837
remove old tags:
curl --request DELETE --data 'name_regex_delete=.*' --data 'older_than=1month' --header "PRIVATE-TOKEN: $PRIVATE_TOKEN" "https://gitlab.com/api/v4/projects/$PROJECT_ID/registry/repositories/$REPO_ID/tags"
=> no response (200 I guess?)
Wait reasonable time for async op, recheck:
curl --header "PRIVATE-TOKEN: $PRIVATE_TOKEN" https://gitlab.com/api/v4/registry/repositories/$REPO_ID?tags_count=true | jq .tags_count
=> 4837
Try rerun:
{"message":"This request has already been made. You can run this at most once an hour for a given container repository"}
Any obvious mistake here?
Thanks!