Get current project settings
- Sandbox: available
- Staging: available
- Production: unknown
Returns the settings of your current project: the on/off settings and the text settings such as app URLs and default access policies.
Auth: bearer token. The caller must be a Practitioner, a project admin, or hold the System Owner access policy. Scope: the caller's project (from the token).
Behaviour
- Settings are read from
Project.setting[]by name. settingsalways has every on/off key. A key that is not stored, or not stored as a boolean, isfalse.valuesalways has every text key. A key that is not stored, or is blank, isnull.DEFAULT_PATIENT_ACCESS_POLICYis read fromProject.defaultPatientAccessPolicy, asAccessPolicy/<id>: the policy patient registration and patient invites give a new patient.- Entries of
Project.setting[]with other names are not returned.
Saved and effective values
settings cannot tell a switch turned off from one never saved. Two records, with every on/off key, can:
overrides: the saved value,trueorfalse, ornullwhen none is saved (or it is not stored as a boolean).effectiveSettings: what Ovok applies. The saved value, else the default below, and off while the feature lacks what it needs (the column on the right).
| Key | Default | Also needs |
|---|---|---|
PATIENT_LOGIN_ENABLED, PRACTITIONER_LOGIN_ENABLED, RELATED_PERSON_LOGIN_ENABLED | on | |
PATIENT_INVITATION_ENABLED | on | DEFAULT_PATIENT_ACCESS_POLICY. |
PRACTITIONER_INVITATION_ENABLED, RELATED_PERSON_INVITATION_ENABLED | on | |
PATIENT_REGISTRATION_ENABLED | on | DEFAULT_PATIENT_ACCESS_POLICY, naming a policy that can be read. |
PRACTITIONER_REGISTRATION_ENABLED | off | DEFAULT_PRACTITIONER_ACCESS_POLICY (or CLINICIAN_INVITE_ACCESS_POLICY): an AccessPolicy of this project. |
CLINICIAN_INVITE_ON_BUSINESS_EMAIL | off | Effective PATIENT_REGISTRATION_ENABLED, and the default practitioner access policy as above. |
CONTENT_ENABLED, MAILING_ENABLED | off | Markers the Console sets; Ovok does not act on them. |
SIGNALS_SEND_AUTO | off | A Signals tenant of the project's own. Observations created through FHIR go to it, and a resident's first one enrols the resident in Signals; ingest readings go there on their own. |
SIGNALS_ANNOTATE_OBSERVATIONS | as SIGNALS_SEND_AUTO | A Signals tenant of the project's own. Signals' alerts and episodes are written into the project as DetectedIssue and Flag, and an alert's reading gets its interpretation. Project roles need read on DetectedIssue and Flag to see them. |
- App URLs are not folded in: they are in
values, and a flow that needs a missing one reports it, for example an invite answers 409app_url_not_configured. - Some routes need more. The sharing invites (
/v1/invites) also need practitioner sharing on, set through the patient-sharing settings. - With
PRACTITIONER_LOGIN_ENABLEDoff, a practitioner who is a project admin keeps refreshing an open session, so they can turn it back on. - A default access policy that cannot be read at that moment counts as missing, as it does for the flows themselves.
- Every key is read from the first
Project.setting[]entry of its name.
App URLs
PATIENT_APP_URL and PRACTITIONER_APP_URL are the app roots that links in emails are built on: https://app.example.com gives https://app.example.com/setpassword/<id>/<secret>.
- Resolution order, per audience: the project's setting, then the parent project's, then the legacy setting (
PATIENT_SIGNUP_URLorCLINICIAN_DASHBOARD_URL, on the project then its parent), then the requestOriginfor flows that allow it, then the deployment default. - For set-password and invite links, only the origin of
PATIENT_SIGNUP_URLis used:https://app.example.com/registergiveshttps://app.example.com, andvitalwise://registergivesvitalwise://. SetPATIENT_APP_URLif the patient app lives under a path. - The continue-as-patient link (a business-address sign-up turned into a clinician invite) uses
PATIENT_SIGNUP_URLin full whenever it is set, ahead ofPATIENT_APP_URL. - An app URL is an https URL on any host (http only on localhost), or an app deep link
scheme://[host][/path]:vitalwise://givesvitalwise:///setpassword/<id>/<secret>. A web URL on this API's own host is refused, and a stored one is skipped when an email is sent. - Only the canonical form is stored and used, without a trailing slash. Userinfo, a query, a fragment, an opaque
scheme:path, and web, script or local schemes used as a deep link (javascript:,data:,file:and others) are refused on write and skipped on send. - An invite with no app URL for its audience answers 409
app_url_not_configuredand creates nothing.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/project/settings' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>The full settings envelope for the caller's current project.
application/json- response
projectId*stringsettings*overrides*The saved value of each switch, or null when the project has none saved.
effectiveSettings*What ovok applies: the saved value, else the default, and off while a needed access policy is missing, or, for SIGNALS_SEND_AUTO and SIGNALS_ANNOTATE_OBSERVATIONS, while the project has no Signals tenant of its own. SIGNALS_ANNOTATE_OBSERVATIONS with no saved value follows SIGNALS_SEND_AUTO.
values*curl -X GET 'https://api.sandbox.ovok.com/v1/project/settings'{ "projectId": "string", "settings": { "CONTENT_ENABLED": true, "MAILING_ENABLED": true, "PATIENT_INVITATION_ENABLED": true, "PATIENT_REGISTRATION_ENABLED": true, "PATIENT_LOGIN_ENABLED": true, "PRACTITIONER_INVITATION_ENABLED": true, "PRACTITIONER_REGISTRATION_ENABLED": true, "PRACTITIONER_LOGIN_ENABLED": true, "RELATED_PERSON_INVITATION_ENABLED": true, "RELATED_PERSON_LOGIN_ENABLED": true, "CLINICIAN_INVITE_ON_BUSINESS_EMAIL": true, "SIGNALS_SEND_AUTO": true, "SIGNALS_ANNOTATE_OBSERVATIONS": true }, "overrides": { "CONTENT_ENABLED": true, "MAILING_ENABLED": true, "PATIENT_INVITATION_ENABLED": true, "PATIENT_REGISTRATION_ENABLED": true, "PATIENT_LOGIN_ENABLED": true, "PRACTITIONER_INVITATION_ENABLED": true, "PRACTITIONER_REGISTRATION_ENABLED": true, "PRACTITIONER_LOGIN_ENABLED": true, "RELATED_PERSON_INVITATION_ENABLED": true, "RELATED_PERSON_LOGIN_ENABLED": true, "CLINICIAN_INVITE_ON_BUSINESS_EMAIL": true, "SIGNALS_SEND_AUTO": true, "SIGNALS_ANNOTATE_OBSERVATIONS": true }, "effectiveSettings": { "CONTENT_ENABLED": true, "MAILING_ENABLED": true, "PATIENT_INVITATION_ENABLED": true, "PATIENT_REGISTRATION_ENABLED": true, "PATIENT_LOGIN_ENABLED": true, "PRACTITIONER_INVITATION_ENABLED": true, "PRACTITIONER_REGISTRATION_ENABLED": true, "PRACTITIONER_LOGIN_ENABLED": true, "RELATED_PERSON_INVITATION_ENABLED": true, "RELATED_PERSON_LOGIN_ENABLED": true, "CLINICIAN_INVITE_ON_BUSINESS_EMAIL": true, "SIGNALS_SEND_AUTO": true, "SIGNALS_ANNOTATE_OBSERVATIONS": true }, "values": { "PATIENT_APP_URL": "string", "PRACTITIONER_APP_URL": "string", "PATIENT_SIGNUP_URL": "string", "CLINICIAN_DASHBOARD_URL": "string", "DEFAULT_PATIENT_ACCESS_POLICY": "string", "DEFAULT_PRACTITIONER_ACCESS_POLICY": "string", "CLINICIAN_INVITE_ACCESS_POLICY": "string" }}List published items of a content type GET
Lists the published items of a user-defined content type for one tenant. First-class collections are read with `GET /v1/public/cms/collections/{collectionSlug}/items` instead. **Auth:** one of the following: - The CMS public API key, in the `x-api-key` header, as `Authorization: Bearer <key>`, or as the `apiKey` query parameter. - A signed-in Ovok session (bearer token), which may only read its own tenant. **Scope:** the tenant you name, by tenant code (`x-ovok-tenant-code` header or `tenant` query parameter) or by project id (`x-ovok-medplum-project-id` header or `projectId` query parameter). Headers win over query parameters, and a tenant code wins over a project id. If you name neither, a signed-in session reads its own tenant. Each Ovok deployment has one set of content; there is no environment to choose. ## Behaviour - Returns the CMS `content-items` whose content type has the slug `contentTypeSlug` and whose status is `published`, in the CMS list envelope. - At most 100 items are returned. There is no paging, sorting or locale selection on this route. - Responses are cached by Ovok for up to 60 seconds. A request that names a tenant gets `Cache-Control: public, s-maxage=60, stale-while-revalidate=300` and a `Vary` on the tenant and API key headers. A request that names no tenant gets `Cache-Control: no-store`. Error responses carry neither. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/public/cms/faq/items?tenant=my-medical-project' \ -H 'x-api-key: <cms public api key>' ```
Update a project setting PUT
Turns one on/off setting of your current project on or off, for example `PRACTITIONER_INVITATION_ENABLED`. **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 - `:key` must be one of the on/off keys returned in `settings` by `GET /v1/project/settings`. It may be URL-encoded. - Writes the entry into `Project.setting[]`, adding it when missing. Every other entry is kept as it is. - The write only succeeds if the project did not change since the server read it; otherwise it answers 409. - The response is the full settings envelope after the write, as `GET /v1/project/settings` returns it. - An unknown `:key` returns 400 `UNKNOWN_SETTING` with the accepted keys. - `SIGNALS_SEND_AUTO` and `SIGNALS_ANNOTATE_OBSERVATIONS` also switch their wiring before the setting is saved: Medplum's `Subscription` for send-auto, Signals' `ovok-annotations` subscriber for annotations. Nothing is saved if that fails (502 `SETTING_WIRING_FAILED`). Turning either on for a project without its own Signals tenant answers 409 `SETTING_NOT_AVAILABLE`; a concurrent change of the same switch answers 409 too. While `SIGNALS_ANNOTATE_OBSERVATIONS` has no saved value it follows `SIGNALS_SEND_AUTO`, so switching send-auto also switches annotations' wiring. - Read the project again and retry on 409. ## Example ```bash curl -X PUT 'https://api.sandbox.ovok.com/v1/project/settings/PRACTITIONER_INVITATION_ENABLED' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "enabled": true }' ```