Create a child project
- Sandbox: available
- Staging: available
- Production: unknown
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
nameunder 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,contactandsettings.settings.timeZonemust be an IANA time zone such asEurope/Zurich(any other value is refused with 422) and defaults toEurope/Berlin.idandextensionin 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
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" } }'{ "projectId": "c3499c27-2973-0a7f-807e-fb8676a92dcb", "success": true }bearerAuthorizationBearer <JWT>application/json- body
id?stringuuidname*string1 <= lengthcontact?array<>address?array<>extension?unknownsettings?The child project was created successfully.
application/json- response
projectId*stringId of the new child project.
success*booleanAlways true.
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/project/child' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "projectId": "string", "success": true}List child project relationships GET
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 - `currentProject` is the caller's project. - `parentProject` is the project your project is a child of, or `null` when it has none. - `childProjects` lists 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`, `contact` and `settings`. `settings.timeZone` defaults to `Europe/Berlin`; `settings.trendsPeriod` defaults to `start: "09:00:00"` and `durationSeconds: 86400`. - `GET /v2/slim/project/child` returns the same lists with a device count per project. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/child' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
List child projects with device counts GET
Returns your current project together with its parent project and its direct child projects, each with its device count. Use it for a project switcher or hierarchy view that shows fleet size. **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 - Same lists as `GET /v1/slim/project/child`: `currentProject`, `parentProject` (`null` when there is none) and every direct child in `childProjects`. Grandchildren and children whose project no longer exists are left out. - Every project also carries `deviceCount`: the number of `Device` resources in that project. - `settings.timeZone` defaults to `Europe/Berlin`; `settings.trendsPeriod` defaults to `start: "09:00:00"` and `durationSeconds: 86400`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v2/slim/project/child' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```