capabilities.work

Check then Close Connection

A 2-step recipe with Azure Web PubSub. We can help you get access.

Recipe · 2 steps

Check then Close Connection

Check whether a connection exists, then close it if present.

  1. Probe whether the connection is still attached to the hub. A 200 means it exists; a 404 means it is already gone.
  2. Close the existing connection, optionally recording a reason.
What you'll need to have ready
  • accessToken: JWT bearer token for the Web PubSub data plane.
  • apiVersion: Data plane REST API version.
  • hub: Target hub name.
  • connectionId: The connection id to check and close.
  • reason: Optional reason recorded when closing the connection.
For your developer

Arazzo workflow microsoft-azure-web-pubsub:check-then-close-connection, 2 operations: webPubSub_connectionExists → webPubSub_closeConnection. Specs on APIs.io.