Projects
List child project relationships
List child project relationships using Ovok’s Slim API.
| Method | Path |
|---|---|
GET | /v1/slim/project/child |
Authentication · Access policies
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 (project admins skip this check).
Scope: The caller's project (from the token).
Request
No parameters.
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 ${OVOK_TOKEN}"Successful response
200 — Project relationships retrieved successfully.
{
"currentProject": {
"resourceType": "Project",
"id": "b7a3d915-6e20-4c8f-9a14-3d5f7b9c1e68",
"name": "Example project",
"address": [{ "line": ["Hauptstrasse 1"], "city": "Berlin", "postalCode": "10115", "country": "DE" }],
"settings": { "timeZone": "Europe/Berlin", "trendsPeriod": { "start": "09:00:00", "durationSeconds": 86400 } }
},
"parentProject": {
"resourceType": "Project",
"id": "c6e2a4f8-0b3d-4719-a5c7-9e1f3b5d7a20",
"name": "Parent project",
"settings": { "timeZone": "Europe/Berlin", "trendsPeriod": { "start": "09:00:00", "durationSeconds": 86400 } }
},
"childProjects": [
{
"resourceType": "Project",
"id": "f0a2c4e6-8b1d-4357-9f9b-1d3e5a7c9b46",
"name": "Child project",
"settings": { "timeZone": "Europe/Berlin", "trendsPeriod": { "start": "09:00:00", "durationSeconds": 86400 } }
}
]
}| Field | Type | Description |
|---|---|---|
currentProject | object | null | The caller's project. |
parentProject | object | null | The project the caller's project is a child of. null when it has none. |
childProjects | object[] | Every direct child project. Empty array when there are none. |
Each project, in currentProject, parentProject and childProjects, has these fields:
| Field | Type | Description |
|---|---|---|
resourceType | "Project" | Always Project. |
id | string (uuid) | Project id. |
name | string | Project name. The project id when the project has no name. |
address | object[] | Postal addresses of the project. Left out when there are none. Each entry has the fields use, type, text, line, city, district, state, postalCode and country. |
contact | object[] | Contact persons of the project. Left out when there are none. Each entry has the fields telecom, name and address. |
settings | object | Project settings. |
settings.timeZone | string | Time zone name. Europe/Berlin when none is stored. |
settings.trendsPeriod | object | The daily window that trends cover. |
settings.trendsPeriod.start | string | Start time as HH:MM:SS. 09:00:00 when none is stored. |
settings.trendsPeriod.durationSeconds | number | Length of the window in seconds. 86400 when none is stored. |
Errors
Last updated on