1 Adding a data subscription
The REST API can be used to create a stream event subscription. The EK80 system provides the possibility of subscribing to a variety of data. Once a subscription has been established, data will be sent to the subscription endpoint and clients can access it.
Context
Using the REST API requests and responses you can set up a subscription for EK80 data. List of supported and avaliable subscription types is found in the Swagger documentation.
In order to set up a subscription you will need to:
•  Create a subscription.
•  Create a communication endpoint.
•  Add the subscription to the endpoint.
Procedure
1 Start EK80 in Normal or Replay operating mode.
2 Acquire the Channel ID for the appropriate channel.
Note
The Channel ID name may differ when using Normal mode versus using Replay mode, depending on the raw file.
a Open the EK80 Subscription API.
The REST API is opened using Swagger documentation.
b Find the Channel ID.
Under ping-configuration operations, perform a GET request:
/api/sounder/ping-configuration/channel-list
The Response Body will provide a full list of available channels in the form of their Channel ID. Example of a Channel ID:
"WBT 1034758-15 ES200-7C_ES"
c Make a note of the Channel ID for the channel you would like to subscribe to. this will be used to create a data subscription
3 Create the data subscription.
There are several output subscriptions available. As an example bottom detection is used in this procedure.
/api/sounder/data-output/bottom-detection-subscriptions
{
  "channel-id": "WBT 582156-15 ES120-7C_ES",
  "settings": {
    "upper-detector-limit": 10,
    "lower-detector-limit": 1000,
    "bottom-back-step": -50
  },
  "subscription-name": "BottomDepth",
  "subscriber-name": "ClientPC"
}
a Open the EK80 Subscription API.
The REST API is opened using Swagger documentation.
b Locate the operation:
Create a bottom detection data subscription
/api/sounder/data-output/bottom-detection-subscriptions
c Fill in the specifications for the request.
Open the Example Value and right-click in the structure. This copies the structure into the specifications field for the request.
Also make sure the Channel ID, being a part of this request is correct.
d Enter appropriate subscription-name and subscriber-name values for the subscription in the subscription.
In this example BottomDepth and ClientPC has been selected.
e Select Try it out!
This creates the new subscription.
f Find the subscription-id.
In the Response Body of the response, you will find a number. This will be referred to as the subscription-id. Make a note of it. This will be used when adding a subscription to an endpoint.
4 Create a new communication endpoint.
a Locate the operation:
Create a new communication end point
/api/sounder/data-output/communication-end-points
b Fill in the specifications for the request.
{
  "name": "DepthOutput",
  "configuration": "tcp://10.120.65.47:20034",
  "communication-type": "zero-mq"
}
Open the Example Value and right-click in the structure. This copies the structure into the specifications field for the request.
Fill in a suitable name for the endpoint, use the IP address of one of the LAN adapters in the EK80 computer. Select a suitable/unique port.
c Select Try it out!.
d Find the communication-end-point.
In the Response Body of the response, you will find a number. This request is referred to as the communication-end-point. Make a note of it to use it when adding a subscription to the endpoint.
5 Send a request to add the subscription to the endpoint.
Add a subscription to the communication end point
/api/sounder/data-output/communication-end-points/{endPointId}/data-subscriptions
Use the communication-end-point to fill in endPointId.
{
  "subscription-id": 1,
  "data-serialization": "protobuf"
}
Open the Example Value and right-click in the structure. This copies the structure into the specifications field for the request.
Fill in the subscription-id.
The plan is to provide the subscribed data as C structure ("c-struct") and/or according to the Protocol Buffer standard ("protobuf").
Note
Protocol Buffer (protobuf) is a Google mechanism for serializing structured data.
6 Select Try it out!.
The subscription is now connected to the endpoint and the port for the endpoint will provide data output for clients to use.