Get applications
Returns the owner's applications — all of them or one by AppEUI — each with its active tokens. Use it to find an AppEUI for create_device_req or an application token.
Request and response: get_applications_req → get_applications_resp.
Access: high access level token only. With a low access level token the server responds with error 1.
Current ONS version
A successful response has a status field — the v0.17 example lacks it. The server does not return error code 3 (Unexpected error).
Request
Fields not marked as required may be omitted.
| Field | Type | Description |
|---|---|---|
cmd | string | get_applications_req |
operation_id | string | Any string; the server returns it in the response to match the request and the response |
appEui | string | Application AppEUI, 16 hex characters; letter case matters. Without the field the server returns all applications of the owner |
{
"cmd": "get_applications_req",
"operation_id": "abc",
"appEui": "819EA8554FCD762A"
}
Response
| Field | Type | Description |
|---|---|---|
cmd | string | get_applications_resp |
operation_id | string | Value from the request |
status | uint8 | 1 — success, 2 — error |
applicationCount | uint32 | Number of applications in the list |
applicationList | array | Applications: appEui — AppEUI, tokens — active application tokens of any access level |
error_code, error_text | uint8, string | Only on error, see below |
{
"cmd": "get_applications_resp",
"operation_id": "abc",
"status": 1,
"applicationCount": 1,
"applicationList": [
{
"appEui": "819EA8554FCD762A",
"tokens": [
"1VZYsWzJeyDIUHSmwddlbD",
"YrLNyNnPNW3bYhoOHwtEN8"
]
}
]
}
Errors
error_code | error_text | What happened |
|---|---|---|
| 1 | Unauthorized access | The request came with a low access level token |
| 2 | Application not found | The owner has no application with this appEui, or it is deleted |
Good to know
- Tokens come in clear text, high access level tokens included. The response does not show a token's access level.
- An application whose tokens are all revoked is not in the list. An application without tokens is listed with an empty
tokens. - There is no
app_idin the response. A connection needs the application identifierapp_id, while the command returns only the AppEUI. Theapp_idof a new application is returned in the response tocreate_application_req.
See also
create_application_req— create an application.- Connection — how to connect with a token.