title: What is the docker registry v2 API endpoint to get the digest for an image?
body: <p>According to <a href="https://docs.docker.com/registry/spec/api/" rel="noreferrer">https://docs.docker.com/registry/spec/api/</a> I can call <code>/v2/&lt;name&gt;/tags/list</code> to get a list of the tags for a given image. It works fine, e.g.:</p>
  
  <pre><code>{"name"=&gt;"avi/test", "tags"=&gt;["latest"]}
  </code></pre>
  
  <p>However, I would like the digest for each tag. Yes, the "digest" is actually the hash of the manifest (at least as I best understood it from the API; not 100% clear). However, I would like a way of knowing what a unique identifier for "latest" (and every other tag) is. </p>
  
  <p>Use case: I might have someone tag a version as latest, and want to check the tit is up to date:</p>
  
  <pre><code>docker push avi/test:2.6
  docker tag avi/test:2.6 avi/test:latest
  docker push avi/test:latest
  # build 2.7
  docker push avi/test:2.7
  # oops! Forgot to tag latest to 2.7
  </code></pre>
  
  <p>In the above case, if I can check not just the tags - which will give me "2.6", "2.7", "latest" - but also the digest (at least of the manifest), I can find what various tags point to, audit, etc.</p>