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.
| Field | Type | Description |
|---|---|---|
cmd | string | delete_application_req |
operation_id | string | Any string; the server returns it in the response to match the request and the response |
appEui | string | Required. Application AppEUI, 16 hex characters; letter case matters |
{
"cmd": "delete_application_req",
"operation_id": "cdma",
"appEui": "258BD226017CBF01"
}
Response
| Field | Type | Description |
|---|---|---|
cmd | string | delete_application_resp |
operation_id | string | Value from the request |
status | uint8 | 1 — the application is deleted, 2 — error |
error_code, error_text | uint8, string | Only on error, see below |
{
"cmd": "delete_application_resp",
"operation_id": "cdma",
"status": 1
}
Errors
error_code | error_text | What happened |
|---|---|---|
| 1 | Unauthorized access | The request came with a low access level token |
| 2 | appEui is required | appEui is missing |
| 3 | Application not found | The 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_reqor move them to another application withupdate_device_reqand itsapplication_euifield. After the application is deleted,delete_device_reqno longer finds these devices. - Retrying is safe. The server responds to a repeated request with error 3: the application is already deleted.
See also
get_applications_req— list of applications.create_application_req— create an application.