How to GET list of tags using registry-alias & repository for Public ECR?

2

I am attempting a REST API call to GET list of image & its tags by providing registry-alias & repository-name as path parameters, for public registry of ECR. I tried below endpoint and I am unsuccessful to get response. I am also unable to get any information related to whether I am doing this right from AWS API reference or other online articles. Any guidance related to getting this working is greatly appreciated.

**My expectation:- **As developer, I should be able GET list of images and tags over REST API, even when I am not authenticated with AWS account.

It will be nice to have more documentation; like for example, what are the endpoints that are supported for public ECR, similar to DockerHub and Microsoft.

REST API that I tried:-

GET https://public.ecr.aws/:registry-alias/:repository-name/tags/list

GET https://public.ecr.aws/v2/:registry-alias/:repository-name/tags/list

Response I received:-

{ "errors": [ { "code": "DENIED", "message": "Not Authorized" } ] }

Reference I went through:-

https://aws.amazon.com/blogs/aws/amazon-ecr-public-a-new-public-container-registry/

https://gallery.ecr.aws

https://docs.aws.amazon.com/AmazonECR/latest/public/public-registries.html

https://docs.aws.amazon.com/AmazonECRPublic/latest/APIReference/Welcome.html

Pranam
asked 2 years ago2052 views
3 Answers
1

I think your question was well described. As a developer I want to be able to get this info the standard way using curl against the API, without the need of calling an operating system command that needs to be properly installed and setup. I still would like an answer to that :)

answered 2 years ago
0

Hi,

to get a list of the available tags of a given repository within a given registry, you can do a POST request to this URL: https://api.us-east-1.gallery.ecr.aws/describeImageTags with the following body:

{
  "registryAliasName": "my-registry",
  "repositoryName": "my-repository"
}

To get a list of the available repositories within a registry, you can do a POST request to https://api.us-east-1.gallery.ecr.aws/describeRepositoryCatalogData with the following body:

{
  "registryAliasName": "my-registry"
}

I found these URLs by analyzing the requests that my browser sent when I visited https://gallery.ecr.aws/cloudwatch-agent?page=1 and https://gallery.ecr.aws/cloudwatch-agent/cloudwatch-agent.

Mirko
answered a year ago
-2

Hi! You can use the ecr public Describe Images API command: https://docs.aws.amazon.com/cli/latest/reference/ecr-public/describe-images.html which will go to the ecr-public and api.ecr-public endpoints.

jsonc
answered 2 years ago
  • Hey, Thanks for reading my question and coming forward to help me.

    Please accept my apologise for not mentioning a crucial piece of this question; which is, I am trying get this information over Postman HTTP GET request. Ahm.. Do you happen to know how can we achieve it through Postman HTTP request?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions