Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Amazon API Gateway WebSocket API

Build real-time two-way communication applications with WebSocket APIs.

Amazon API Gateway WebSocket API is one of 18 APIs that Amazon API Gateway publishes on the APIs.io network, described by an AsyncAPI event-driven specification.

Tagged areas include Bi-Directional, Real-Time, and WebSocket. The published artifact set on APIs.io includes API documentation, a getting-started guide, an AsyncAPI specification, and a JSON-LD context.

This event API exposes 0 operations across 5 channels, and defines 13 schemas. It is described by AsyncAPI 3.0.0, at version 2018-11-29.

The API connects through 2 servers: {api-id}.execute-api.{region}.amazonaws.com (wss), {api-id}.execute-api.{region}.amazonaws.com (https).

0 operations 5 channels 13 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 3.0.0
API Version
2018-11-29
Base URL
https://apigateway.{region}.amazonaws.com
License

Messages & Schemas 13

The contract defines 13 schemas that model the data carried by its messages. The most detailed are RequestIdentity (11 properties), ConnectionRequestContext (6 properties), CustomRoutePayload (3 properties), WebSocketMessage (3 properties). Each schema is shown below with its type and property counts.

ConnectionRequest
message
The initial connection request sent when a client establishes a WebSocket connection. Includes headers, query parameters, and request context from the HTTP upg…
DisconnectionNotice
message
Notification sent when a client disconnects from the WebSocket API, either through a clean close or due to a timeout or error.
DefaultMessage
message
A message received on the $default route when no custom route matches the incoming message content.
CustomRouteMessage
message
A message matched to a custom route based on the route selection expression. The message body is passed to the route's integration.
PostToConnectionMessage
message
A message sent from the backend to a specific connected WebSocket client via the @connections management API.
ConnectionStatusResponse
message
Connection information returned when querying the @connections management endpoint for a specific connection ID.
ConnectionRequestContext
object
The event context provided to the $connect route integration, including request metadata and identity information.
6 properties
DisconnectEventContext
object
The event context provided to the $disconnect route integration when a client disconnects.
1 property
WebSocketMessage
object
A generic WebSocket message received on the $default route. The structure is defined by the application.
3 properties
CustomRoutePayload
object
A message routed to a custom route. Includes an action field (or whatever the route selection expression evaluates) along with application-defined data.
3 properties
BackendMessage
object
A message payload sent from the backend service to a connected WebSocket client via the @connections API.
3 properties
ConnectionInfo
object
Information about a WebSocket connection returned by the @connections management API GET request.
3 properties
RequestIdentity
object
Identity information from the request context.
11 properties

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

amazon-api-gateway-websocket-asyncapi.yml Raw ↑

Other APIs Amazon API Gateway publishes across the network.

Amazon API Gateway HTTP API
Amazon API Gateway Management API
Amazon API Gateway API Keys API
Amazon API Gateway Authorizers API
Amazon API Gateway Base Path Mappings API
Amazon API Gateway Deployments API
Amazon API Gateway Documentation API
Amazon API Gateway Domain Names API
Amazon API Gateway Gateway Responses API
Amazon API Gateway Methods API
Amazon API Gateway Models API
Amazon API Gateway Request Validators API