This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions
This operation is used to get a token for a websocket client to use in order to bind to one or more subscriptions.
The canonical URL for this operation definition is
http://hl7.org/fhir/OperationDefinition/Subscription-get-ws-binding-token
Formal Definition (as a OperationDefinition).
URL: [base]/Subscription/$get-ws-binding-token
URL: [base]/Subscription/[id]/$get-ws-binding-token
This is not an idempotent operation
At the Instance level, this parameter is ignored. At the Resource level, one or more parameters containing a FHIR id for a Subscription to get a token for. In the absence of any specified ids, the server may either return a token for all Subscriptions available to the caller with a channel-type of websocket or fail the request.
An access token that a client may use to show authorization during a websocket connection. The security details of the token are implementation-dependent and beyond the scope of this operation definition.
The date and time this token is valid until.
The subscriptions this token is valid for.
The URL the client should use to connect to Websockets.
Request: Request a websocket binding token for Subscription ABC123
GET [base]/Subscription/ABC123/$get-ws-binding-token
Response: Returned on successful evaluation
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8" ?> <Parameters xmlns="http://hl7.org/fhir"> <id value="2774a842-9feb-437c-a768-7c353c0a37f6"/> <parameter> <name value="token"/> <valueString value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IndlYnNvY2tldCB0b2tlbiIsImlhdCI6MTUxNjIzOTAyMn0.Ti55Tbdt3Ub_I6_kDw8byL4Jn5DQwwJIXt188HggzEw"/> </parameter> <parameter> <name value="expiration"/> <valueDateTime value="2020-01-17T19:30:22-05:00"/> </parameter> <parameter> <name value="subscription"/> <valueString value="ABC123"/> </parameter> <parameter> <name value="websocket-url"/> <valueUrl value="wss://example.org/fhir/R5/subscription-websocket"/> </parameter> </Parameters>
For more information about operations, including how they are invoked, see Operations.