---
title: "Update a container"
method: PUT
path: "/container/{ocid}"
tags: ["Container"]
---

# Update a container

`PUT /container/{ocid}`

## Request

- Base URL: `https://sylve.lan:8181/api`
- URL: `https://sylve.lan:8181/api/container/{ocid}`
- Auth: API key in header `Authorization`

Queue recreation of a container from an edited spec, keeping its volumes

## Path parameters

- `ocid` integer, required

## Request body

- GithubComAlchemillahqSylveInternalInterfacesServicesContainerSpec
  - `annotations` object
  - `command` string[]
  - `entrypoint` string[]
  - `env` GithubComAlchemillahqSylveInternalDbModelsContainerEnvVar[]
    - `name` string
    - `value` string
  - `extraHosts` string[]
  - `hostname` string
  - `image` string
  - `ip` string
  - `mounts` GithubComAlchemillahqSylveInternalDbModelsContainerMount[]
    - `guid` string
    - `mode` string
    - `owner` string
    - `readOnly` boolean
    - `source` string
    - `target` string
    - `type` 'volume' | 'dataset' | 'path'
  - `network` string
  - `os` string
  - `ports` GithubComAlchemillahqSylveInternalDbModelsContainerPort[]
    - `containerPort` integer
    - `hostIp` string
    - `hostPort` integer
    - `protocol` string
  - `pullImage` boolean
  - `restart` string
  - `restartRetries` integer
  - `shmSize` string
  - `stopTimeout` integer
  - `user` string
  - `workDir` string

## Response `202`

Accepted

- GithubComAlchemillahqSylveInternalAPIResponseInternalHandlersContainerTaskResponse
  - `data` InternalHandlersContainerTaskResponse
    - `action` string
    - `ocId` integer
    - `outcome` string
    - `taskId` integer
  - `error` string
  - `message` string
  - `status` string

## Changes

- **2026-11-03** `9565cdd0abf5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/alchemillahq/apis/sylve-api/changes/container/:ocid/put.md)

---

[API](https://skmtc.dev/alchemillahq/apis/sylve-api.md) - [All operations](https://skmtc.dev/alchemillahq/apis/sylve-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alchemillahq/apis/sylve-api/revisions/9565cdd0abf5?raw)
