Skip to main content

Stop a container

POST 

/node/:hostname/container/docker/:id/stop

Stop a running container on the target node. Optionally specify a timeout before the container is killed.

Request

Path Parameters

    hostname stringrequired

    Possible values: non-empty

    Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).

    id stringrequired

    Possible values: non-empty, Value must match regular expression ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$

    Container identifier (name or ID). Must start with an alphanumeric character and may contain letters, digits, underscores, dots, and hyphens.

Body

Optional stop parameters.

    timeout integer

    Possible values: <= 300

    Default value: 10

    Seconds to wait before killing the container. Defaults to 10.

Responses

Container stop accepted.

Schema

    job_id uuid

    The job ID used to process this request.

    results

    object[]

    required

  • Array [

  • hostname stringrequired

    The hostname of the agent.

    id string

    Container identifier.

    message string

    Status message.

    changed boolean

    Whether the operation modified system state.

    error string

    Error message if the agent failed.

  • ]

Loading...