List child projects with device counts
- Sandbox: available
- Staging: available
- Production: unknown
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(nullwhen there is none) and every direct child inchildProjects. Grandchildren and children whose project no longer exists are left out. - Every project also carries
deviceCount: the number ofDeviceresources in that project. settings.timeZonedefaults toEurope/Berlin;settings.trendsPerioddefaults tostart: "09:00:00"anddurationSeconds: 86400.
Example
curl -X GET 'https://api.sandbox.ovok.com/v2/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/v2/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 } }, "deviceCount": 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 } }, "deviceCount": 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 } }, "deviceCount": 0 } ]}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 } ```
Delete a child project DELETE
Deletes an empty direct child project of your current project, including the setup Ovok created with it. Use it to remove a child project that is no longer needed. **Auth:** Bearer token for a project admin. No other role passes. **Scope:** `subProjectId` must be a direct child of the caller's project (from the token). ## Behaviour - The child must be empty: no `Patient`, `Device` or `Location`, and no child projects of its own. Otherwise the request is refused with 409 and nothing is changed. The 409 body has `error: "project_not_empty"`, a `counts` object per resource type and the `childProjectIds`. - On success Ovok unlinks the child from your project, deletes its access policies, practitioners, memberships, threshold plan, client applications, top-level organizations and tenant code, deletes the project, then revokes its Signals tenant. - User accounts are never deleted: a user can belong to other projects. Audit records (`Provenance`, `AuditEvent`) are kept. - Two deletes of the same project cannot run at once: the second gets 409. - The delete is safe to retry. If the Signals revoke fails, the project is already deleted and the request answers 502. Send the same request again to finish it. - Returns `{ "success": true }`. ## Example ```bash curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/project/child/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```