Skip to main content

Delete application

Deletes an application of the owner by AppEUI. The application is marked as deleted: it disappears from the get_applications_req response, and its tokens can no longer be used to connect.

Request and response: delete_application_req → delete_application_resp.
Access: high access level token only; any application of the owner can be deleted, including the one you are connected to. With a low access level token the server responds with error 1.

Current ONS version

The server does not return codes 4 (Application used) and 5 (Unexpected error): the application is deleted even if it has devices.

Request​

Fields not marked as required may be omitted.

FieldTypeDescription
cmdstringdelete_application_req
operation_idstringAny string; the server returns it in the response to match the request and the response
appEuistringRequired. Application AppEUI, 16 hex characters; letter case matters
{
"cmd": "delete_application_req",
"operation_id": "cdma",
"appEui": "258BD226017CBF01"
}

Response​

FieldTypeDescription
cmdstringdelete_application_resp
operation_idstringValue from the request
statusuint81 — the application is deleted, 2 — error
error_code, error_textuint8, stringOnly on error, see below
{
"cmd": "delete_application_resp",
"operation_id": "cdma",
"status": 1
}

Errors​

error_codeerror_textWhat happened
1Unauthorized accessThe request came with a low access level token
2appEui is requiredappEui is missing
3Application not foundThe owner has no application with this appEui, or it is already deleted

Good to know​

  • The application's devices are not deleted. Before deleting the application, delete them with delete_device_req or move them to another application with update_device_req and its application_eui field. After the application is deleted, delete_device_req no longer finds these devices.
  • Retrying is safe. The server responds to a repeated request with error 3: the application is already deleted.

See also​