Delete entity instance

DELETE/projects/{projectId}/entities/{entityId}

Base URL: https://api.tinkermode.com

Delete the specified entity instance.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user API key of a user with permission to delete child entities on the parent entity, a service account token with the same permission, or a project API key with admin permission.

Path parameters

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityIdstringYesEntity ID (unique within project)

Query parameters

NameTypeRequiredConstraintsDescription
deleteDescendantsbooleanNoBy default, entities with descendants cannot be deleted. In order to delete an entity and its descendants this parameter must be true.

Responses

204 The entity has been deleted. When deleteDescendants is true and the entity has descendants, the server deletes them in the background after it sends this response.

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of invalid data or denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

404 The required entity does not exist or is not accessible.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

409 The entity was not deleted. The reason field of the response body tells why.

  • ENTITY_IS_IN_USE: the entity is in use. This reason is checked first. The data field says what uses it, and only one of these is returned:
    • data.bizstackAppInstallationIds: a Bizstack App is installed in the entity, or in a descendant that would be deleted with it. Lists the IDs of those installations. Uninstall the apps, then try again. This is checked before alert rules.
    • data.alertRuleIds: the condition of an alert rule names the entity, or a descendant that would be deleted with it. Lists the IDs of those rules, enabled or disabled. Change or delete the rules, then try again.
  • ENTITY_HAS_CHILDREN: the entity has children, and deleteDescendants is not true.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.