Projects

Remove a project member

  • Sandbox: available
  • Staging: available
  • Production: unknown
DELETE
/v1/projects/me/members/{membershipId}

Removes a Practitioner from your current project.

Auth: bearer token of a project admin (ProjectMembership.admin). Scope: the caller's project (from the token). A membership of another project answers 404.

Behaviour

  • Deletes the membership and its Practitioner profile. The User is deleted only when it has no other membership in any project.
  • All or nothing: if one delete fails, the others are undone and the request fails.
  • Removing the last admin of the project is refused.
  • The response is { "success": true }.

Example

curl -X DELETE 'https://api.sandbox.ovok.com/v1/projects/me/members/c3499c27-2973-0a7f-807e-fb8676a92dcb' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

membershipId*string

Id of the ProjectMembership.

Response Body

Success acknowledgement.

application/json
  1. response
success*true
Value intrue
Example Request
curl -X DELETE 'https://api.sandbox.ovok.com/v1/projects/me/members/string'
Example Response
{  "success": true}

Update a project member PATCH

Changes a Practitioner member of your current project: their admin flag, their `access[]` entries, or both. **Auth:** bearer token of a project admin (`ProjectMembership.admin`). **Scope:** the caller's project (from the token). A membership of another project answers 404. ## Behaviour - `admin`: `true` or `false` sets the flag; `null` leaves it as it is. - `access`: replaces the membership's `access[]` entries; an empty array removes them. Omit it to leave them as they are. Each entry must name an AccessPolicy of this project. A membership without a base `accessPolicy` cannot have its entries removed, because Medplum would then grant access to the whole project. - `versionId`: pass the `meta.versionId` you read. If the membership changed since, the request answers 409. A concurrent write that lands first also answers 409. - A request that changes nothing returns the member unchanged. - Demoting the last admin of the project is refused. - After the change, Ovok renews its cached session data for every session of the member. Medplum applies the change on the member's next request. ## Example ```bash curl -X PATCH 'https://api.sandbox.ovok.com/v1/projects/me/members/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "admin": true }' ```

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' ```