ContainerImage

This document uses the REST API. For more details, see the Authentication for API page.

List instances of container image

get

List instances of container image

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

Example: f59045b3-f093-40c3-871d-a334ae30c568
Query parameters
image_idsstring · uri[] · max: 100optional

A comma-separated list of Image IDs

Example: ["sha256:b26f21f90920dba8401e30b89ad803587f81cce9bd1f92750f963556da2f930f","sha256:28984a62eb713aa5fff922ba06e8689f20e4b2f07de30f3d753b868389c0904f"]
platformstring · enumoptional

The image Operating System and processor architecture

Example: linux/amd64
Options: aix/ppc64, android/386, android/amd64, android/arm, android/arm/v5, android/arm/v6, android/arm/v7, android/arm64, android/arm64/v8, darwin/amd64, darwin/arm, darwin/arm/v5, darwin/arm/v6, darwin/arm/v7, darwin/arm64, darwin/arm64/v8, dragonfly/amd64, freebsd/386, freebsd/amd64, freebsd/arm, freebsd/arm/v5, freebsd/arm/v6, freebsd/arm/v7, illumos/amd64, ios/arm64, ios/arm64/v8, js/wasm, linux/386, linux/amd64, linux/arm, linux/arm/v5, linux/arm/v6, linux/arm/v7, linux/arm64, linux/arm64/v8, linux/loong64, linux/mips, linux/mipsle, linux/mips64, linux/mips64le, linux/ppc64, linux/ppc64le, linux/riscv64, linux/s390x, linux/x86_64, netbsd/386, netbsd/amd64, netbsd/arm, netbsd/arm/v5, netbsd/arm/v6, netbsd/arm/v7, openbsd/386, openbsd/amd64, openbsd/arm, openbsd/arm/v5, openbsd/arm/v6, openbsd/arm/v7, openbsd/arm64, openbsd/arm64/v8, plan9/386, plan9/amd64, plan9/arm, plan9/arm/v5, plan9/arm/v6, plan9/arm/v7, solaris/amd64, windows/386, windows/amd64, windows/arm, windows/arm/v5, windows/arm/v6, windows/arm/v7, windows/arm64, windows/arm64/v8
namesstring[] · max: 1optional

The container registry names

Example: ["gcr.io/snyk/redis:5"]
versionstringrequired

Requested API version

Example: 2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
limitinteger · int32 · min: 10 · max: 100 · default: 10optional

Number of results to return per page

Example: 10
starting_afterstringoptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringoptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
Responses
curl -L \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/container_images?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "attributes": {
        "layers": [
          "sha256:2bd864580926b790a22c8b96fd74496fe87b3c59c0774fe144bab2788e78e676"
        ],
        "names": [
          "gcr.io/snyk/redis:5"
        ],
        "platform": "linux/amd64"
      },
      "id": "sha256:2bd864580926b790a22c8b96fd74496fe87b3c59c0774fe144bab2788e78e676",
      "relationships": {
        "image_target_refs": {
          "links": {
            "self": "https://example.com/api/this_resource"
          }
        }
      },
      "type": "container_image"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Get instance of container image

get

Get instance of container image

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

Example: f59045b3-f093-40c3-871d-a334ae30c568
image_idstring · urirequired

Image ID

Example: sha256:2bd864580926b790a22c8b96fd74496fe87b3c59c0774fe144bab2788e78e676
Pattern: ^sha256(:|%3A)[a-f0-9]{64}$
Query parameters
versionstringrequired

Requested API version

Example: 2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Responses
curl -L \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/container_images/{image_id}?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": {
    "attributes": {
      "layers": [
        "sha256:2bd864580926b790a22c8b96fd74496fe87b3c59c0774fe144bab2788e78e676"
      ],
      "names": [
        "gcr.io/snyk/redis:5"
      ],
      "platform": "linux/amd64"
    },
    "id": "sha256:2bd864580926b790a22c8b96fd74496fe87b3c59c0774fe144bab2788e78e676",
    "relationships": {
      "image_target_refs": {
        "links": {
          "self": "https://example.com/api/this_resource"
        }
      }
    },
    "type": "container_image"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

List instances of image target references for a container image

get

List instances of image target references for a container image

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

Example: f59045b3-f093-40c3-871d-a334ae30c568
image_idstring · urirequired

Image ID

Example: sha256:2bd864580926b790a22c8b96fd74496fe87b3c59c0774fe144bab2788e78e676
Pattern: ^sha256(:|%3A)[a-f0-9]{64}$
Query parameters
versionstringrequired

Requested API version

Example: 2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
limitinteger · int32 · min: 10 · max: 100 · default: 10optional

Number of results to return per page

Example: 10
starting_afterstringoptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringoptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
Responses
curl -L \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/container_images/{image_id}/relationships/image_target_refs?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "attributes": {
        "platform": "linux/amd64",
        "target_id": "123e4567-e89b-12d3-a456-426614174000",
        "target_reference": "text"
      },
      "id": "3cd4af4c-fb15-45c4-9acd-8e8fcc6690af",
      "type": "image_target_reference"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Last updated

Was this helpful?

Revision created

Add comment to emphasize required filters hidden in GitBook collapsed field