Release 5 Preview #3
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 official 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
ids0..*id

At the Resource level, one or more parameters containing one or more comma-delimited FHIR ids of Subscriptions to get tokens for. In the absense of any specified ids, the server returns tokens for all Subscriptions available to the caller with a channel-type of websocket. At the Instance level, this parameter is ignored.

Out Parameters:
NameCardinalityTypeBindingProfileDocumentation
return1..1Parameters

The returned Parameters MUST include a valueString named "token" and a valueDateTime named "expiration". The returned Parameters MAY include a valueString named "subscriptions" with a comma-delimited list of subscriptions covered by this token.

Note: as this is the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource

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>
</Bundle>

 

For more information about operations, including how they are invoked, see Operations.