Attach to a container via a websocket Run in API Explorer

GET /containers/{id}/attach/ws

Path parameters

  • id string Required

    ID or name of the container

Query parameters

  • detachKeys string

    Override the key sequence for detaching a container.Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, ,, or _.

  • logs boolean

    Return logs

    Default value is false.

  • stream boolean

    Return stream

    Default value is false.

  • stdin boolean

    Attach to stdin

    Default value is false.

  • stdout boolean

    Attach to stdout

    Default value is false.

  • stderr boolean

    Attach to stderr

    Default value is false.

Responses

  • 101

    no error, hints proxy about hijacking

  • 200

    no error, no upgrade header found

  • 400 application/json

    bad parameter

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 404 application/json

    no such container

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

GET /containers/{id}/attach/ws
curl \
 --request GET 'http://api.example.com/v1.44/containers/{id}/attach/ws'
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (404)
{
  "message": "No such container: c2ada9df5af8"
}
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}