All Products
Search
Document Center

Get the image layer information

Last Updated: May 28, 2018

Description

Query the image layer information.

Request information

Request line

  1. GET /repos/{RepoNamespace}/{RepoName}/tags/{Tag}/layers HTTP/1.1

Request line parameters (URI parameters)

None.

Special request header

None.

Request body

None.

Request body explanation

Name Type Required Description
RepoNamespace String Yes The name of the namespace.
RepoName String Yes The name of the repository.
Tag String Yes The image version.

Response information

Response line

  1. HTTP/1.1 200 OK

Special response header

None.

Response body

  1. {
  2. "data": {
  3. "image": {
  4. "repoNamespace": "String",
  5. "repoName": "String",
  6. "layers": "Array",
  7. "tag": "String",
  8. "region": "String"
  9. }
  10. },
  11. "requestId": "String"
  12. }

Response body explanation

Name Type Description
repoNamespace String The name of the namespace.
repoName String The name of the repository.
layers Array The image layer information.
tag String The image version (tag).
region String The region of the repository that the image belongs to.

Example

Request example

  1. GET /repos/namespace1/repo1/tags/tag1/layers HTTP/1.1
  2. <Common request header>

Response example

  1. HTTP/1.1 200 OK
  2. <Common response header>
  3. {
  4. "data": {
  5. "image": {
  6. "repoNamespace": "namespace1",
  7. "repoName": "repo1",
  8. "layers": [{
  9. "layerCMD": "file:a in /TEMP",
  10. "blobDigest": "sha256:b",
  11. "blobSize": 1000,
  12. "layerInstruction": "COPY",
  13. "layerIndex": 2
  14. }, {
  15. "layerCMD": "[\"bash\"]",
  16. "blobDigest": "sha256:c",
  17. "blobSize": 32,
  18. "layerInstruction": "CMD",
  19. "layerIndex": 1
  20. }, {
  21. "layerCMD": "file:e in /",
  22. "blobDigest": "sha256:f",
  23. "blobSize": 52608285,
  24. "layerInstruction": "ADD",
  25. "layerIndex": 0
  26. }],
  27. "tag": "latest",
  28. "region": "cn-hangzhou"
  29. }
  30. },
  31. "requestId": "requestId"
  32. }