List child project relationships
- Sandbox: available
- Staging: available
- Production: unknown
Returns your current project together with its parent project and its direct child projects. Use it to build a project switcher or hierarchy view.
Auth: Bearer token for a practitioner, project admin or System Owner session. The caller's access policy must grant AccessPolicy:read (a project admin who holds no access policy skips this check).
Scope: The caller's project (from the token).
Behaviour
currentProjectis the caller's project.parentProjectis the project your project is a child of, ornullwhen it has none.childProjectslists every direct child, with no cap. Grandchildren are not included.- A child whose project no longer exists is left out.
- Each project carries
name(the project id when it has none),address,contactandsettings.settings.timeZonedefaults toEurope/Berlin;settings.trendsPerioddefaults tostart: "09:00:00"anddurationSeconds: 86400. GET /v2/slim/project/childreturns the same lists with a device count per project.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/child' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>Project relationships retrieved successfully.
application/json- response
currentProject*parentProject*childProjects*array<>curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/child'{ "currentProject": { "resourceType": "Project", "id": "string", "name": "string", "address": [ { "use": "work", "type": "postal", "text": "string", "line": [ "string" ], "city": "string", "district": "string", "state": "string", "postalCode": "string", "country": "string" } ], "contact": [ { "telecom": [ { "system": "email", "use": "work", "value": "string" } ], "name": { "use": "temp", "prefix": [ "string" ], "given": [ "string" ], "family": "string", "suffix": [ "string" ] }, "address": { "use": "work", "type": "postal", "text": "string", "line": [ "string" ], "city": "string", "district": "string", "state": "string", "postalCode": "string", "country": "string" } } ], "settings": { "timeZone": "string", "trendsPeriod": { "start": "string", "durationSeconds": 0 } } }, "parentProject": { "resourceType": "Project", "id": "string", "name": "string", "address": [ { "use": "work", "type": "postal", "text": "string", "line": [ "string" ], "city": "string", "district": "string", "state": "string", "postalCode": "string", "country": "string" } ], "contact": [ { "telecom": [ { "system": "email", "use": "work", "value": "string" } ], "name": { "use": "temp", "prefix": [ "string" ], "given": [ "string" ], "family": "string", "suffix": [ "string" ] }, "address": { "use": "work", "type": "postal", "text": "string", "line": [ "string" ], "city": "string", "district": "string", "state": "string", "postalCode": "string", "country": "string" } } ], "settings": { "timeZone": "string", "trendsPeriod": { "start": "string", "durationSeconds": 0 } } }, "childProjects": [ { "resourceType": "Project", "id": "string", "name": "string", "address": [ { "use": "work", "type": "postal", "text": "string", "line": [ "string" ], "city": "string", "district": "string", "state": "string", "postalCode": "string", "country": "string" } ], "contact": [ { "telecom": [ { "system": "email", "use": "work", "value": "string" } ], "name": { "use": "temp", "prefix": [ "string" ], "given": [ "string" ], "family": "string", "suffix": [ "string" ] }, "address": { "use": "work", "type": "postal", "text": "string", "line": [ "string" ], "city": "string", "district": "string", "state": "string", "postalCode": "string", "country": "string" } } ], "settings": { "timeZone": "string", "trendsPeriod": { "start": "string", "durationSeconds": 0 } } } ]}List current project users GET
Lists the practitioner memberships of your current project, with each member's user, profile, access policy and invite status. Use it to render a project's team list. **Auth:** Bearer token for a practitioner, project admin or System Owner session. The caller's access policy must grant `Practitioner:read` (a project admin who holds no access policy skips this check). The session must carry a project. **Scope:** The caller's project (from the token). ## Behaviour - Returns one row per `ProjectMembership` of `profileType` (`Practitioner`) that has both a user and a profile. Memberships whose user or profile cannot be resolved are left out. - `status` is `Pending` while the user has an unused invite or has never set a password, and `Active` otherwise. - `accessPolicyId`, `profileId` and `userId` narrow the memberships by exact id. - `search` is a fuzzy match over the profile name, the user name and the access policy name. - `sortBy` defaults to `profileName` and `orderBy` to `ASC`. Rows with an empty sort value go last in `ASC` and first in `DESC`. - Paging is in memory: `page` (default `0`) and `count` (default `20`, 1 to 100). `total` counts the rows after `search`, before paging. - Answers are cached for up to about a minute, so a member added or removed a moment ago can be missing or still listed. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/users?sortBy=userName&orderBy=ASC&page=0&count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
Create a child project POST
Creates a child project under your current project and makes you its admin. Use it to set up a new customer or site below your organisation. **Auth:** Bearer token for a project admin. No other role passes. **Scope:** The new project becomes a direct child of the caller's project (from the token). A project that is itself a child may create children of its own. ## Behaviour - Your project must already hold at least one access policy: the child gets a copy of every access policy of your project. Without one the request is refused with 424 and nothing is created. - A second child with exactly the same `name` under the same parent is refused with 422. - The whole create is all or nothing. A failure undoes what was written and answers the failure. - On success Ovok: - creates the project with practitioner invitations and practitioner login enabled, and practitioner registration plus all patient registration, invitation and login disabled; - gives it its own Signals tenant and its own tenant code; - links it to your project; - copies your practitioner profile into it and adds you as an admin member; - seeds its thresholds from the global defaults, with an out-of-bed window that ends at 09:00 and starts at a time picked once from 18:00 to 20:00 in 5-minute steps, so homes do not all start watching in the same minute. The start is stored and stays until someone saves another window; - gives its Signals tenant the derived readings: each resident's daily mean heart rate and breathing rate (local midnight to midnight) and last night's sleep period, scheduled in the project's time zone. - The organization stored inside the project is built from `name`, `address`, `contact` and `settings`. `settings.timeZone` must be an IANA time zone such as `Europe/Zurich` (any other value is refused with 422) and defaults to `Europe/Berlin`. `id` and `extension` in the body are ignored. - When Signals cannot take the derived readings, the create is undone and answers 502, 503 when Signals is overloaded, or 504 when it does not answer in time. - When the platform has it enabled, an Ovok support account is also added as a non-admin member holding the child's System Owner access policy. It is skipped when the child has no single policy of that name. This step never fails the create. - Child project lists are refreshed right away. - Returns `{ "projectId": "<new project id>", "success": true }`. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/slim/project/child' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "name": "My Medical Project", "contact": [{ "telecom": [{ "system": "email", "use": "work", "value": "max.mustermann@example.com" }] }], "settings": { "timeZone": "Europe/Berlin" } }' ``` ```json { "projectId": "c3499c27-2973-0a7f-807e-fb8676a92dcb", "success": true } ```