v1

latestOpenAPI 3.0.1Apache 2.02026-07-17111176225.7 KB
Images

Submit a new image for analysis by the engine

Creates a new analysis task that is executed asynchronously

post/images

Query parameters

forceboolean

Override any existing entry in the system

autosubscribeboolean

Instruct engine to automatically begin watching the added tag for updates from registry

Headers

x-anchore-accountstring

An account name to change the resource scope of the request to that account, if permissions allow (admin only)

Request body

dockerfilestring

Base64 encoded content of the dockerfile for the image, if available. Deprecated in favor of the 'source' field.

digeststring

A digest string for an image, maybe a pull string or just a digest. e.g. nginx@sha256:123 or sha256:abc123. If a pull string, it must have same regisry/repo as the tag field. Deprecated in favor of the 'source' field

tagstring

Full pullable tag reference for image. e.g. docker.io/nginx:latest. Deprecated in favor of the 'source' field

created_atstring date-time

Optional override of the image creation time, only honored when both tag and digest are also supplied e.g. 2018-10-17T18:14:00Z. Deprecated in favor of the 'source' field

image_typestring

Optional. The type of image this is adding, defaults to "docker". This can be ommitted until multiple image types are supported.

annotationsobject

Annotations to be associated with the added image in key/value form

Example request

{
  "dockerfile": "dockerfile",
  "digest": "digest",
  "created_at": "2000-01-23T04:56:07.000+00:00",
  "annotations": "{}",
  "tag": "tag",
  "source": {
    "import": {
      "local_image_id": "local_image_id",
      "operation_uuid": "operation_uuid",
      "contents": {
        "parent_manifest": "parent_manifest",
        "manifest": "manifest",
        "dockerfile": "dockerfile",
        "image_config": "image_config",
        "packages": "packages"
      },
      "digest": "digest",
      "parent_digest": "parent_digest",
      "tags": [
        "docker.io/library/nginx:latest",
        "docker.io/library/nginx:latest"
      ]
    },
    "digest": {
      "creation_timestamp_override": "2000-01-23T04:56:07.000+00:00",
      "dockerfile": "dockerfile",
      "pullstring": "pullstring",
      "tag": "tag"
    },
    "archive": {
      "digest": "digest"
    },
    "tag": {
      "dockerfile": "dockerfile",
      "pullstring": "pullstring"
    }
  },
  "image_type": "image_type"
}

Response

Successfully added image to analysis queue

image_contentobject

A metadata content record for a specific image, containing different content type entries

last_updatedstring date-time
created_atstring date-time
imageDigeststring
userIdstring
annotationsobject
image_status'active' | 'inactive' | 'disabled'

State of the image

analysis_status'not_analyzed' | 'analyzing' | 'analyzed' | 'analysis_failed'

A state value for the current status of the analysis progress of the image

Example response

[
  {
    "last_updated": "2000-01-23T04:56:07.000+00:00",
    "analysis_status": "not_analyzed",
    "created_at": "2000-01-23T04:56:07.000+00:00",
    "annotations": "{}",
    "image_status": "active",
    "userId": "userId",
    "image_content": "{}",
    "image_detail": [
      {
        "registry": "registry",
        "last_updated": "2000-01-23T04:56:07.000+00:00",
        "imageId": "imageId",
        "fulldigest": "fulldigest",
        "repo": "repo",
        "dockerfile": "dockerfile",
        "created_at": "2000-01-23T04:56:07.000+00:00",
        "fulltag": "fulltag",
        "userId": "userId",
        "imageDigest": "imageDigest"
      },
      {
        "registry": "registry",
        "last_updated": "2000-01-23T04:56:07.000+00:00",
        "imageId": "imageId",
        "fulldigest": "fulldigest",
        "repo": "repo",
        "dockerfile": "dockerfile",
        "created_at": "2000-01-23T04:56:07.000+00:00",
        "fulltag": "fulltag",
        "userId": "userId",
        "imageDigest": "imageDigest"
      }
    ],
    "imageDigest": "imageDigest"
  }
]