FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions icon

FHIR Infrastructure icon Work Group Maturity Level: 2Trial Use Compartments: N/A

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

In Parameters:
Name Scope Cardinality Type Binding Profile Documentation
id type 0..* id

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.

Out Parameters:
Name Scope Cardinality Type Binding Profile Documentation
token 1..1 string

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.

expiration 1..1 dateTime

The date and time this token is valid until.

subscription 0..* string

The subscriptions this token is valid for.

websocket-url 1..1 url

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.