Skip to main content
Question

Use a Websocket API

  • July 31, 2020
  • 0 replies
  • 37 views

jayqueue
Forum|alt.badge.img

Hello,

I have to connect to a WebSocket API (never even knew that excisted) which has an endpoint.

wss://<IP>/api/v2/data/main/metrics

Then I can send

{
"Reference": "Get_reference",
"Command": {
"Get": {
"Select": "Identifier",
"Filter": "parameter"
}
}
}

And I should get a JSON back

{
  "Reference": "Get_reference",
  "Data": [
    {
      // ... and so on
   }
}

I tried with WebSocketReceiver to connect to the API, I got the handshake and it keeps running. 

Then I created a workspace with a WebSocketSender to send the JSON but it only sends and I get no output. 

Is this even possible or should I use a PythonCaller?

 

TIA

 Edit: I'm testing this in FME Workbench - is this someting the FME server should do? I found this: http://docs.safe.com/fme/2018.1/html/FME_Server_Documentation/Content/ReferenceManual/WebSocket-Server.htm

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.