Skip to main content

Update a project

MethodPath
PUT/v1/slim/project/:id

Authentication · Access policies

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​

curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/project/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
-H "Authorization: Bearer ${OVOK_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example project",
"address": [{ "line": ["Hauptstrasse 1"], "city": "Berlin", "postalCode": "10115", "country": "DE" }],
"settings": { "timeZone": "Europe/Berlin", "trendsPeriod": { "start": "09:00:00", "durationSeconds": 86400 } }
}'

Successful response​

200 — The project was updated successfully.

Errors​

StatusMeaning
400The project is neither the caller's project nor a direct child of it, or it cannot be read.
401The bearer token is missing or invalid, or the session carries no project.
403The session is not a project admin session.
404No project has this id.
422id is not a UUID, or the body fails validation.