Releasesv0.1.0
Api referenceEndpointsShares

Manifest request of a share link (SMART Health Links)

POST
/shl/{manifest_id}

The url of a share link's payload, called by the reader's viewer (the built-in one at /shl/view or any other that implements SMART Health Links) with no credential: the manifest id is the secret. Any origin may call it (Access-Control-Allow-Origin: *). Every request on a known link is recorded in the audit log (share.access, actor share_link).

The answer holds the one file of the share, application/fhir+json encrypted as a JWE: embedded when it fits embeddedLengthMax (or no limit was sent), else a location that serves it once, within 15 minutes. A link that is unknown, revoked, disabled or past its expiry is a 404, and the cases cannot be told apart. A wrong or missing passcode is a 401 with remainingAttempts; the 10th wrong passcode disables the link for good. A link busy past 2 seconds is a 503 with Retry-After. Unknown members of the body are ignored. Rate limited per client address (OHS_RATE_LIMIT_OAUTH).

Path Parameters

manifest_id*string

The last path segment of a share link's url: 43 base64url characters (32 random bytes). The server keeps only its SHA-256 hash.

Request Body

application/json
  1. body
recipient*string

Who opens the link, as the reader names themselves; shown to the owner.

Length1 <= length <= 256
passcode?string

Required when the link's flag holds P.

embeddedLengthMax?integer

The longest file to embed; a longer one comes as a location.

Range0 <= value

Response Body

The manifest.

application/json
  1. response
status*string

A snapshot never changes.

files*array<>
curl -X POST 'http://localhost:8080/shl/string' \  -H 'Content-Type: application/json' \  -d '{  "recipient": "string"}'
{  "status": "finalized",  "files": [    {      "contentType": "application/fhir+json",      "embedded": "string",      "location": "http://example.com",      "lastUpdated": "2019-08-24T14:15:22Z"    }  ]}
Edit on GitHub