10-26-2020 09:03 AM
We’re working with a third party application which has a REST API to submit requests to retrieve data. The API is asynchronous in the sense that the response doesn’t actually contain the requested data, but contains a job ID and status on the submitted request (i.e. accepted). There is not REST API to poll the status of job. Instead, they provide a “notification” service that we can open a WebSocket connection to and they will deliver real-time updates on the job. They will send a notification over the WebSocket connection when the job is complete and it will contain a downloadUrl that links to the requested data.
I’m looking for a way to implement the WebSock in SnapLogic. One thought I had was to create the WebSocket connection using a Script snap and to filter the messages sent from the “notification” service until the “completed” message with the Url was received. The Script snap would then close the WebSocket connection and write the URL to the Script snap’s output view.
Any other suggestions?