---
title: "POST /v1/{+repository}:prewarmArtifact"
method: POST
path: "/v1/{+repository}:prewarmArtifact"
tags: ["projects"]
---

# POST /v1/{+repository}:prewarmArtifact

`POST /v1/{+repository}:prewarmArtifact`

Prewarms an artifact for streaming.

## Path parameters

- `repository` string, required

## Request body

- PrewarmArtifactRequest — The request for prewarming an artifact for streaming.
  - `version` string — Optional. The artifact version Format: projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}
  - `retentionDays` string, int64 — Optional. The retention days of the prewarmed artifact. If not specified, the artifact will be cached for 3 days.
  - `force` boolean — Optional. If true, old artifact will be evicted to make room for the new artifact.
  - `platform` PrewarmPlatform — The platform (architecture and OS) of the image. This is a sub-message.
    - `os` string — Optional. The OS of the image or tag. For example, "linux" or "windows".
    - `architecture` string — Optional. The architecture of the image or tag. For example, "arm64" or "amd64".
  - `streamLocation` string — Optional. The location to cache the artifact in. If not specified, the artifact will be cached in the same location as the artifact. multi-region is not supported for this field.
  - `tag` string — Optional. The artifact tag Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/artifactregistry.md) · [All operations](https://skmtc.net/google/apis/artifactregistry/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/artifactregistry/versions/ab5639c979b9/schema)
