/session Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities.
Deprecated: This endpoint is deprecated and will be removed in a future version. Server should support gRPC directly on the listening socket.
This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection.
For example, the client sends this request to upgrade the connection:
POST /session HTTP/1.1
Upgrade: h2c
Connection: UpgradeThe Docker daemon responds with a 101 UPGRADED response follow with
the raw stream:
HTTP/1.1 101 UPGRADED
Connection: Upgrade
Upgrade: h2cConnection and access
API connection and authentication guidance
/v1.57
No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.
Parameters
No parameters are declared.
Request and responses
Response
101
application/vnd.docker.raw-stream
Response
400
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
500
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Referenced schemas
#/components/schemas/ErrorResponse
Complete operation contract
{
"description": "Start a new interactive session with a server. Session allows server to\ncall back to the client for advanced capabilities.\n\n\u003e **Deprecated**: This endpoint is deprecated and will be removed in a future version.\n\u003e Server should support gRPC directly on the listening socket.\n\n### Hijacking\n\nThis endpoint hijacks the HTTP connection to HTTP2 transport that allows\nthe client to expose gPRC services on that connection.\n\nFor example, the client sends this request to upgrade the connection:\n\n```\nPOST /session HTTP/1.1\nUpgrade: h2c\nConnection: Upgrade\n```\n\nThe Docker daemon responds with a `101 UPGRADED` response follow with\nthe raw stream:\n\n```\nHTTP/1.1 101 UPGRADED\nConnection: Upgrade\nUpgrade: h2c\n```\n",
"operationId": "Session",
"responses": {
"101": {
"content": {
"application/vnd.docker.raw-stream": {}
},
"description": "no error, hijacking successful"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "bad parameter"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "server error"
}
},
"summary": "Initialize interactive session",
"tags": [
"Session"
]
}