DELETE_enage_sites_{siteReference}

Delete Site

DELETE /engage/sites/{siteReference}

This API allows an authorized site admin to delete an existing site. The user account must be a SAM managed account type and must be an “admin” in the site that the delete request is being issued for.

The site must not contain any other “Operator”, “Manager”, or “SiteAdmin”.

The site must not contain any commissioned ENGAGE devices.

NOTE: The SAM API’s, ENGAGE MAPP, and ENGAGE Web APP will not allow access to a user that is not associated with any site, even if the Basic Auth, or log in credentials are valid for that user. It is therefore recommended to not delete the last site that you are a SiteAdmin on until you have created at least one new site that you are an authorized SiteAdmin, Manager, or Operator.

NOTE: Requests to this endpoint can be made only by a SiteAdmin.

Authentication

Basic Authentication, must be a partner managed account type

ROLE: SiteAdmin only

URI Parameters

  • siteReference = string (required)

    • Reference ID of the site

Body Parameters

  • NONE

Example request

DELETE /engage/sites/28bf5e95-bc41-4462-8623-9d26be7e3c35 HTTP/1.1

Host: partner.lockwebserv.com

Content-Type: application/json

Authorization: Basic c2l0ZUFkbWluQHNvZnR3YXJlLmNvbTpFTkdBR0UxMjM0NTY=

Response

HTTP status code 204

  • No Content – Site Deleted

HTTP status code 403

  • Forbidden – Role is not allowed to perform action

HTTP status code 412

  • Precondition Failed – Please see the possible response body below
  • "Cannot delete Site. Remove all other Operators and try again"

    • There is another “Operate”, “Manager”, or “SiteAdmin” on this site. Please delete these and try again.
  • “Cannot delete Site. Remove all Devices and try again.”

    • Site contains commissioned device. Need to delete all devices