---
title: "Upgrade a container with new image and args"
method: POST
path: "/containers/{id}/upgrade"
tags: ["Container"]
---

# Upgrade a container with new image and args

`POST /containers/{id}/upgrade`

## Path parameters

- `id` string, required

## Request body

- ContainerUpgradeConfig — ContainerUpgradeConfig is used for API "POST /containers/{name:.*}/upgrade". when upgrade a container, we must specify new image used to create a new container, and also can specify `Cmd` and `Entrypoint` for new container. There is all parameters that upgrade a container, if want to change other parameters, i think you should use `update` API interface.
  - `Image` string, required
  - `Cmd` string[] — Execution commands and args
  - `Entrypoint` string[] — The entrypoint for the container as a string or an array of strings. If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default.

## Response `200`

no error

## Other responses

- `400` — bad parameter
- `404` — An unexpected 404 error occurred.
- `500` — An unexpected server error occurred.

---

[API](https://skmtc.dev/aliyun/apis/pouch-engine-api.md) · [All operations](https://skmtc.dev/aliyun/apis/pouch-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aliyun/pouch-engine-api/revisions/36d75b2825fc/schema)
