---
title: "Submit a new image for analysis by the engine"
method: POST
path: "/images"
tags: ["Images"]
---

# Submit a new image for analysis by the engine

`POST /images`

Creates a new analysis task that is executed asynchronously

## Query parameters

- `force` boolean
- `autosubscribe` boolean

## Headers

- `x-anchore-account` string

## Request body

- ImageAnalysisRequest — A request to add an image to be watched and analyzed by the engine. Optionally include the dockerfile content. Either source, digest or tag must be present.
  - `dockerfile` string — Base64 encoded content of the dockerfile for the image, if available. Deprecated in favor of the 'source' field.
  - `digest` string — 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
  - `tag` string — Full pullable tag reference for image. e.g. docker.io/nginx:latest. Deprecated in favor of the 'source' field
  - `created_at` string, 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_type` string — Optional. The type of image this is adding, defaults to "docker". This can be ommitted until multiple image types are supported.
  - `annotations` object — Annotations to be associated with the added image in key/value form
  - `source` ImageSource — A set of analysis source types. Only one may be set in any given request.
    - `tag` RegistryTagSource, nullable — An image reference using a tag in a registry, this is the most common source type.
      - `pullstring` string, required — A docker pull string (e.g. docker.io/nginx:latest, or docker.io/nginx@sha256:abd) to retrieve the image
      - `dockerfile` string — Base64 encoded content of the dockerfile used to build the image, if available.
    - `digest` RegistryDigestSource, nullable — An image reference using a digest in a registry, includes some extra tag and timestamp info in addition to the pull string to allow proper tag history reconstruction.
      - `pullstring` string, required — A digest-based pullstring (e.g. docker.io/nginx@sha256:123abc)
      - `tag` string, required — A valid docker tag reference (e.g. docker.io/nginx:latest) that will be associated with the image but not used to pull the image.
      - `creation_timestamp_override` string, date-time — Optional override of the image creation time to support proper tag history construction in cases of out-of-order analysis compared to registry history for the tag
      - `dockerfile` string — Base64 encoded content of the dockerfile used to build the image, if available.
    - `archive` AnalysisArchiveSource, nullable — An image reference in the analysis archive for the purposes of loading analysis from the archive into th working set
      - `digest` string, required — The image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored.
    - `import` ImageImportManifest, nullable
      - `contents` ImportContentDigests — Digest of content to use in the final import
        - `packages` string, required — Digest to use for the packages content
        - `image_config` string, required — Digest for reference content for image config
        - `manifest` string, required — Digest to reference content for the image manifest
        - `parent_manifest` string — Digest for reference content for parent manifest
        - `dockerfile` string — Digest for reference content for dockerfile
      - `tags` string[]
      - `digest` string
      - `parent_digest` string — The digest of the images's manifest-list parent if it was accessed from a multi-arch tag where the tag pointed to a manifest-list. This allows preservation of that relationship in the data
      - `local_image_id` string — An "imageId" as used by Docker if available
      - `operation_uuid` string

## Response `200`

Successfully added image to analysis queue

- AnchoreImage[] — A list of Anchore Images
  - `image_content` object — A metadata content record for a specific image, containing different content type entries
  - `image_detail` ImageDetail[] — Details specific to an image reference and type such as tag and image source
    - `created_at` string, date-time
    - `last_updated` string, date-time
    - `fulltag` string — Full docker-pullable tag string referencing the image
    - `fulldigest` string — Full docker-pullable digest string including the registry url and repository necessary get the image
    - `userId` string
    - `imageId` string
    - `registry` string
    - `repo` string
    - `dockerfile` string, nullable
    - `imageDigest` string — The parent Anchore Image record to which this detail maps
  - `last_updated` string, date-time
  - `created_at` string, date-time
  - `imageDigest` string
  - `userId` string
  - `annotations` object
  - `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

## Other responses

- `500` — Internal Error

---

[API](https://skmtc.net/banzaicloud/apis/anchore-engine-api-server.md) · [All operations](https://skmtc.net/banzaicloud/apis/anchore-engine-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/banzaicloud/anchore-engine-api-server/versions/38e5705e0b21/schema)
