Release 5 Ballot

This page is part of the FHIR Specification (v5.0.0-ballot: FHIR R5 Ballot Preview). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

FHIR Infrastructure 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:
NameCardinalityTypeBindingProfileDocumentation
id0..*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 absense 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:
NameCardinalityTypeBindingProfileDocumentation
token1..1string

An access token that a client may use to show authorization during a websocket connection.

expiration1..1dateTime

The date and time this token is valid until.

subscription0..*string

The subscriptions this token is valid for.

websocket-url1..1url

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.