Get a project
- Sandbox: available
- Staging: available
- Production: unknown
Returns a project's name, address, contact and settings. Use it to show or edit your project or one of its child projects.
Auth: Bearer token. The caller's access policy must grant AccessPolicy:read and AccessPolicy:update (a project admin who holds no access policy skips this check).
Scope: The project in the path. It must be the caller's project (from the token) or a direct child of it.
Behaviour
addressandcontactcome from the organization stored inside the project.namefalls back to the project id when the project has no name.settings.timeZonedefaults toEurope/Berlinwhen none is stored.settings.trendsPerioddefaults tostart: "09:00:00"anddurationSeconds: 86400when none is stored.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>id*stringuuidThe project was retrieved successfully.
application/json- response
resourceType*"Project""Project"id*stringname*stringaddress?array<>contact?array<>settings?curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "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 } }}Get project patient counts GET
Returns summary counts of the residents in a project by state: active, recently discharged, discharged and archived. Use it for project overview tiles. **Auth:** Bearer token. The caller's access policy must grant `Patient:search` and `Patient:read` (a project admin who holds no access policy skips this check). **Scope:** The project in the path. It must be the caller's project (from the token) or a direct child of it. ## Behaviour - Counts come from the project's live device list, so only residents linked to a device row are counted. A resident without a device is not included. - Each resident is counted once, even when linked to several devices. - A row is left out when its device, resident, location or organization belongs to another project. - The device list is cached, so a change can take a moment to show. If the list fails to build, the last complete list is used. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb/patient-counts' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
Update a project PUT
Updates a project's name, address, contact and settings, and returns the updated project. Use it to edit your project or one of its child projects. **Auth:** Bearer token of a project admin (`ProjectMembership.admin`). **Scope:** The project in the path. It must be the caller's project (from the token) or a direct child of it. ## Behaviour - Sets the project `name` and replaces the organization stored inside the project with one built from `name`, `address`, `contact` and `settings`. This is a full replace, not a merge: - an omitted `address` or `contact` clears it; - an omitted `settings.timeZone` resets the time zone to `Europe/Berlin`; - an omitted `settings.trendsPeriod` removes the stored trends period, so reads fall back to the default. - `id` and `extension` in the body are ignored. The project comes from the path. - `settings.trendsPeriod.start` must be `HH:MM:SS`. - The response has the shape of `GET /v1/slim/project/{id}`. ## Example ```bash curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "name": "My Medical Project", "address": [{ "line": ["Hauptstrasse 1"], "city": "Berlin", "postalCode": "10115", "country": "DE" }], "settings": { "timeZone": "Europe/Berlin", "trendsPeriod": { "start": "09:00:00", "durationSeconds": 86400 } } }' ```