End a share
- Sandbox: available
- Staging: available
- Production: unknown
Ends a share, cancels a pending invite, or declines a practitioner's invite. A related person (a carer) leaves a share they received. Access stops at once.
Auth: bearer token of a Patient or a RelatedPerson. Scope: the caller's project (from the token).
Behaviour
- Who may call it, by
consentId:- a patient-to-patient share: the sharer or the recipient;
- a pending patient-to-patient invite: the sharer (this cancels it);
- a share of the caller's record with a practitioner, or a practitioner's pending invite to the caller: the patient.
- a share of the caller's codes with a related person, or its pending invite: the patient;
- a share a patient gave the caller as their related person: the related person (see below).
- A practitioner gets 403.
- Every grant bound to the Consent is removed from the members who hold it, and the Consent is set to
inactive, in one atomic write. The holders' cached sessions are refreshed. - Calling it again on an ended share only sweeps any grants left behind, so retrying is safe.
- If the records keep changing during the write, it retries up to three times, then answers 409. Retry the call.
- Returns
204 No Content.
A related person leaving a share
- The Consent is set to
inactive, as when the patient ends it, and its grant leaves the caller's own membership, in one atomic write. The caller's cached sessions are refreshed. - The membership keeps its base policy. One that had lost it gets it back, so it never reads as full project access.
404when the share is not one the caller received, for example another carer's or a patient-to-patient share. It never says whose it is.409when the share already ended, or a record changed during the write. Read the list again and retry.
Example
curl -X DELETE 'https://api.sandbox.ovok.com/v1/patient-sharing/shares/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>consentId*stringuuidThe share ended; no content.
curl -X DELETE 'https://api.sandbox.ovok.com/v1/patient-sharing/shares/497f6eca-6276-4993-bfeb-53cbbbba6f08'List shares GET
Lists the signed-in patient's active shares in both directions, the practitioners their whole record is shared with, and the related persons they share codes with. For a signed-in related person (a carer), lists the shares patients gave them. **Auth:** bearer token of a Patient or a RelatedPerson. **Scope:** the caller's project (from the token). ## Behaviour - `outgoing`: the caller's active patient-to-patient shares (Consents where the caller is the sharer), including the `includeMedications` choice. - `incoming`: what is shared with the caller, read from the grants on the caller's own membership, since those decide what the caller can see. Each share includes its `includeMedications` choice. A grant whose Consent cannot be read is still listed, so it can be ended. - `practitioners`: the caller's active record shares with practitioners. - `relatedPersons`: the caller's active shares with related persons (carers), each with its `codes` and `includeMedications` choice. - `received`: for a related person, the active shares patients gave them: the sharing patient (`sharer`), the shared `codes`, `includeMedications` and `startedAt`. Only their own: another carer's shares never show. Empty for a patient. - A related person gets only `received`; the other lists are empty. - Names are the display names of the Patient, Practitioner and RelatedPerson profiles in the project. - A practitioner gets 403. - Each Consent search returns at most 100 entries; there is no paging. - Pending invites (drafts) are not listed. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/patient-sharing/shares' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
List the project's CMS API keys GET
Lists the API keys of your current project's CMS content. A key unlocks public CMS delivery (`/v1/public/cms/...`) of this project's tenant only. The keys themselves are never returned. **Auth:** bearer token of a project admin. The caller must also be a Practitioner, an admin or hold the System Owner access policy. **Scope:** the caller's project (from the token). ## Behaviour - `keys` is newest first. Each has `id`, `name`, `prefix` (the key's first 12 characters, to tell keys apart), `createdAt` and `isDefault`. - Every project starts with one key, `isDefault: true` with `id` `default` and `createdAt: null`: the key public delivery took before keys were per project. It works until you revoke it. Its `prefix` is only its first 4 characters: the same key serves every project that has not revoked it. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/cms/api-keys' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```