Skip to main content

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.

FieldTypeDescription
cmdstringget_applications_req
operation_idstringAny string; the server returns it in the response to match the request and the response
appEuistringApplication 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​

FieldTypeDescription
cmdstringget_applications_resp
operation_idstringValue from the request
statusuint81 — success, 2 — error
applicationCountuint32Number of applications in the list
applicationListarrayApplications: appEui — AppEUI, tokens — active application tokens of any access level
error_code, error_textuint8, stringOnly on error, see below
{
"cmd": "get_applications_resp",
"operation_id": "abc",
"status": 1,
"applicationCount": 1,
"applicationList": [
{
"appEui": "819EA8554FCD762A",
"tokens": [
"1VZYsWzJeyDIUHSmwddlbD",
"YrLNyNnPNW3bYhoOHwtEN8"
]
}
]
}

Errors​

error_codeerror_textWhat happened
1Unauthorized accessThe request came with a low access level token
2Application not foundThe 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_id in the response. A connection needs the application identifier app_id, while the command returns only the AppEUI. The app_id of a new application is returned in the response to create_application_req.

See also​