OceanSync External WebSocket API v0.5.1

Beta, authenticated streaming API.

The service does not retain messages for replay. Messages can be lost when there are no connected clients, and during service restarts or client reconnects.

The serverless runtime can close or restart WebSocket connections. During a graceful service restart, the service closes connections with WebSocket code 1012 and reason Service Restart. Clients must reconnect when a connection closes and should use exponential backoff with jitter.

Servers

  • wss://v1.ws.api.oceansync.com/wssexternalWebSocketApi
    Security:
    • HTTP
      • Scheme: bearer

      Opaque OceanSync API token supplied in the Authorization header during the WebSocket handshake:

      Authorization: Bearer <token>

Operations

  • RECEIVE /ais/raw

    Beta subscribe-only WebSocket stream for tagged AIS AIVDM text frames. Clients do not send subscription commands after connecting.

    Receive tagged AIS AIVDM WebSocket text frames.

    Each WebSocket text frame contains one tagged raw AIVDM line, or multiple related tagged lines separated by CRLF. Each line starts with a NMEA 0183 tag block containing the message timestamp and station identifier.

    Operation IDreceiveAisRaw

    Available only on servers:

    Additional security requirements:
    • HTTP
      • Scheme: bearer

      Opaque OceanSync API token supplied in the Authorization header during the WebSocket handshake:

      Authorization: Bearer <token>

    Accepts the following message:

    Tagged AIS raw AIVDM frame

    One WebSocket text frame with tagged AIS AIVDM line content.

    Message IDrawAivdmFrame
    string

    UTF-8 text frame containing one or more tagged raw AIVDM lines. Each line starts with a tag block such as \c:1720915200,s:123*07\. The c tag is the rounded source message timestamp. The s tag is the station identifier. Multi-line frames use CRLF as the line separator.

    Examples

Messages

  • #1Tagged AIS raw AIVDM frame

    One WebSocket text frame with tagged AIS AIVDM line content.

    Message IDRawAivdmFrame
    string

    UTF-8 text frame containing one or more tagged raw AIVDM lines. Each line starts with a tag block such as \c:1720915200,s:123*07\. The c tag is the rounded source message timestamp. The s tag is the station identifier. Multi-line frames use CRLF as the line separator.