Projects

Delete a child project

Delete a child project using Ovok’s Slim API.

MethodPath
DELETE/v1/slim/project/child/:subProjectId

Authentication · Access policies

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).

Request

Path parameters

NameTypeRequiredDescription
subProjectIdstringYesId of the child project to delete. Must be a direct child of your project.

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" (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.
  • If the project's Signals tenant credentials cannot be read, the request answers 503 and nothing is changed. Retry it.
  • If the project's Signals tenant credentials cannot be read, the request answers 503 and nothing is changed. Retry it.
  • 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

curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/project/child/b7a3d915-6e20-4c8f-9a14-3d5f7b9c1e68' \
  -H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response

200 — The sub tenant was deleted successfully.

{ "success": true }
FieldTypeDescription
successbooleanAlways true.

Errors

StatusMeaning
401The bearer token is missing or invalid, or the session carries no project.
403The caller is not a project admin.
404subProjectId is not a direct child of the caller's project.
409The project still holds residents, devices, locations or child projects, or another delete of it is in progress.
422subProjectId is empty.
502The project was deleted, but its Signals tenant could not be revoked. Retry the delete.
503The Signals tenant credentials of the project cannot be read. Nothing was changed. Retry shortly.

Last updated on

On this page