action anchore_add_image { label: "Submit a new image for analysis by the engine" description: "Creates a new analysis task that is executed asynchronously" provider: anchore method: POST path: "/images" encoding: json input: { type: "object" properties: { annotations: { type: "object" description: "Annotations to be associated with the added image in key/value form" } autosubscribe: { type: "boolean" } created_at: { type: "string" format: "date-time" description: "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" } digest: { type: "string" description: "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" } dockerfile: { type: "string" description: "Base64 encoded content of the dockerfile for the image, if available. Deprecated in favor of the 'source' field." } force: { type: "boolean" } image_type: { type: "string" description: "Optional. The type of image this is adding, defaults to \"docker\". This can be ommitted until multiple image types are supported." } source: { type: "object" description: "A set of analysis source types. Only one may be set in any given request." properties: { archive: { type: "object" description: "An image reference in the analysis archive for the purposes of loading analysis from the archive into th working set" required: ["digest"] properties: { digest: { type: "string" description: "The image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored." } } } digest: { type: "object" description: "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." required: ["pullstring", "tag"] properties: { creation_timestamp_override: { type: "string" format: "date-time" description: "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: { type: "string" description: "Base64 encoded content of the dockerfile used to build the image, if available." } pullstring: { type: "string" description: "A digest-based pullstring (e.g. docker.io/nginx@sha256:123abc)" } tag: { type: "string" description: "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." } } } import: { type: "object" required: ["contents", "digest", "operation_uuid", "tags"] properties: { contents: { type: "object" description: "Digest of content to use in the final import" required: ["image_config", "manifest", "packages"] properties: { dockerfile: { type: "string" description: "Digest for reference content for dockerfile" } image_config: { type: "string" description: "Digest for reference content for image config" } manifest: { type: "string" description: "Digest to reference content for the image manifest" } packages: { type: "string" description: "Digest to use for the packages content" } parent_manifest: { type: "string" description: "Digest for reference content for parent manifest" } } } digest: { type: "string" } local_image_id: { type: "string" description: "An \"imageId\" as used by Docker if available" } operation_uuid: { type: "string" } parent_digest: { type: "string" description: "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" } tags: { type: "array" items: { type: "string" description: "Full docker reference tags" } } } } tag: { type: "object" description: "An image reference using a tag in a registry, this is the most common source type." required: ["pullstring"] properties: { dockerfile: { type: "string" description: "Base64 encoded content of the dockerfile used to build the image, if available." } pullstring: { type: "string" description: "A docker pull string (e.g. docker.io/nginx:latest, or docker.io/nginx@sha256:abd) to retrieve the image" } } } } } tag: { type: "string" description: "Full pullable tag reference for image. e.g. docker.io/nginx:latest. Deprecated in favor of the 'source' field" } "x-anchore-account": { type: "string" } } additionalProperties: false } output: { type: "array" description: "A list of Anchore Images" items: { type: "object" description: "A unique image in the engine. May have multiple tags or references. Unique to an image content across registries or repositories." properties: { analysis_status: { type: "string" description: "A state value for the current status of the analysis progress of the image" enum: ["not_analyzed", "analyzing", "analyzed", "analysis_failed"] } annotations: { type: "object" } created_at: { type: "string" format: "date-time" } imageDigest: { type: "string" } image_content: { type: "object" description: "A metadata content record for a specific image, containing different content type entries" } image_detail: { type: "array" description: "Details specific to an image reference and type such as tag and image source" items: { type: "object" description: "A metadata detail record for a specific image. Multiple detail records may map a single catalog image." properties: { created_at: { type: "string" format: "date-time" } dockerfile: { type: "string" } fulldigest: { type: "string" description: "Full docker-pullable digest string including the registry url and repository necessary get the image" } fulltag: { type: "string" description: "Full docker-pullable tag string referencing the image" } imageDigest: { type: "string" description: "The parent Anchore Image record to which this detail maps" } imageId: { type: "string" } last_updated: { type: "string" format: "date-time" } registry: { type: "string" } repo: { type: "string" } userId: { type: "string" } } } } image_status: { type: "string" description: "State of the image" enum: ["active", "inactive", "disabled"] } last_updated: { type: "string" format: "date-time" } record_version: { type: "string" description: "The version of the record, used for internal schema updates and data migrations." } userId: { type: "string" } } } } }