API Gateway WebSocket Connection Service, gRPC: ConnectionService
Written by
Updated at June 14, 2023
A set of methods for managing API Gateway WebSocket connections.
Call | Description |
---|---|
Get | Returns the specified connection info. |
Send | Sends data to the specified connection. |
Disconnect | Disconnects the specified connection. |
Calls ConnectionService
Get
Returns the specified connection info.
rpc Get (GetConnectionRequest) returns (Connection)
GetConnectionRequest
Field | Description |
---|---|
connection_id | string Required. ID of the connection to get. The maximum string length in characters is 50. |
Connection
Field | Description |
---|---|
id | string ID of the connection. |
gateway_id | string ID of the API Gateway. |
identity | Identity The information about the caller making the request to API Gateway. |
connected_at | google.protobuf.Timestamp The timestamp at which connection was established. |
last_active_at | google.protobuf.Timestamp The timestamp at which connection was last accessed. |
Identity
Field | Description |
---|---|
source_ip | string The source IP address of the caller making the request to API Gateway. |
user_agent | string The User Agent of the caller making the request to API Gateway. |
Send
Sends data to the specified connection.
rpc Send (SendToConnectionRequest) returns (SendToConnectionResponse)
SendToConnectionRequest
Field | Description |
---|---|
connection_id | string Required. ID of the connection to which send. The maximum string length in characters is 50. |
data | bytes Required. Data to send. The maximum string length in characters is 131072. |
type | enum DataType Type of the sending data.
|
SendToConnectionResponse
Empty.
Disconnect
Disconnects the specified connection.
rpc Disconnect (DisconnectRequest) returns (DisconnectResponse)
DisconnectRequest
Field | Description |
---|---|
connection_id | string Required. ID of the connection to disconnect. The maximum string length in characters is 50. |
DisconnectResponse
Empty.