Set a practitioner's access entries
- Sandbox: available
- On your own host? Choose https://{host} in the playground.
Replaces the access entries of a practitioner of your current project: the AccessPolicies that limit what they can read and write.
Scope: the caller's project (from the token). A project admin, such as an Admin client application on your server.
Behaviour
:practitionerIdis the practitioner'sPractitionerid. A practitioner who is not a member of the project answers 404.accessreplaces the membership'saccess[]entries. Each must name an AccessPolicy of this project, writtenAccessPolicy/<id>; an entry can carryparametervalues (nameplusvalueReferenceorvalueString) for a policy that takes parameters.- The membership's base
accessPolicyand its admin flag stay as they are. An emptyaccessclears the entries, unless the membership has no baseaccessPolicy: a membership with neither reaches the whole project, so that answers 400. versionId, optional, is the membership'smeta.versionIdyou read; a membership changed since answers 409.- The change applies on the practitioner's next request.
- Answers 204 with no body.
Example
curl -X PUT 'https://api.sandbox.ovok.com/v1/projects/me/practitioners/c3499c27-2973-0a7f-807e-fb8676a92dcb/access' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "access": [{ "policy": { "reference": "AccessPolicy/c3499c27-2973-0a7f-807e-fb8676a92dcb" } }] }'Who can call it: a project admin. See roles.
bearerAuthorizationBearer <JWT>practitionerId*stringId of the Practitioner.
application/json- body
access*array<>items <= 100versionId?string1 <= lengthThe access entries are replaced.
curl -X PUT 'https://api.sandbox.ovok.com/v1/projects/me/practitioners/string/access' \ -H 'Content-Type: application/json' \ -d '{ "access": [ { "policy": { "reference": "string" } } ]}'List administered projects GET
Lists every project you administer, with the tenant code you need to switch to it. Every other `/v1/projects` route answers about the single project of your token; use this one to build a project picker. **Auth:** You do not need to be an admin of your current project. **Scope:** your own user's Practitioner memberships across all projects, kept only where the membership is an admin one. ## Behaviour - One row per project, in membership order, even when you hold two memberships on one project. - `page` (from 0, default 0) and `count` (1 to 100, default 20) page over the projects. `total` counts the projects you administer, not your memberships. - `tenantCode` is `null` for a project that has none. `name` is `null` when the project can no longer be read; the row is kept. - `isMainProject` is `true` for a project with no parent, `false` for a child, and `null` when the hierarchy could not be read. - `parentProjectId` is set only when the parent is also a project you administer; otherwise it is `null`. - To switch, pass `tenantCode` to `POST /v1/auth/tenant/Practitioner/login/token`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/projects?page=0&count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ``` **Who can call it:** a practitioner, a project admin or a System Owner session. See [roles](/access-policies#who-can-call-a-route).
Get current project features GET
Returns the Medplum features (`Project.features`) enabled on your current project, such as `bots` or `cron`. **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' ``` **Who can call it:** a practitioner, a project admin or a System Owner session. See [roles](/access-policies#who-can-call-a-route).