Update current project features
- Sandbox: available
- Staging: available
- Production: unknown
Replaces the Medplum features (Project.features) of your current project with the list you send.
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
- The list replaces the stored one; it is not merged. Send every feature you want enabled. Sending the same list twice has the same result.
- Each value must be one of the FHIR
Project.featurescodes. - The write only succeeds if the project did not change since the server read it; otherwise it answers 409.
Example
curl -X PATCH 'https://api.sandbox.ovok.com/v1/projects/me/features' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "features": ["bots", "cron", "websocket-subscriptions"] }'bearerAuthorizationBearer <JWT>application/json- body
features*array<>The updated features on the caller's current project.
application/json- response
features*array<string>curl -X PATCH 'https://api.sandbox.ovok.com/v1/projects/me/features' \ -H 'Content-Type: application/json' \ -d '{ "features": [ "ai" ]}'{ "features": [ "string" ]}Get current project features GET
Returns the Medplum features (`Project.features`) enabled on your current project, such as `bots` or `cron`. **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 - Values are returned as stored, without checking them against the list `PATCH` accepts. An empty array means no features are enabled. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/projects/me/features' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
Get a public resource GET
Reads a FHIR resource through its public token, without a bearer token. Use it to share one resource, such as a form or a document, with people who have no Ovok account. **Auth:** none. The public token in the path is the credential: anyone with it can read the resource. ## Behaviour - A resource becomes public when it gets a token in `meta.extension`, with the URL `https://api.ovok.com/fhir/StructureDefinition/public-resource-token`. Use `PATCH /public/{resourceType}/{id}` to give a resource a token. - The token names exactly one resource. The response is that resource as stored, including its `meta.extension`. - A token stops working when the resource's token is replaced or deleted, or when the resource is deleted. ## Example ```bash curl 'https://api.sandbox.ovok.com/public/example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```