sonar-apps
Retrieves the list of apps registered in Logpresso Sonar. You can filter by app name or description using the keywords option.
Command properties
| Property | Description |
|---|---|
| Command type | Driver query |
| Required permission | Administrator |
| License usage | Counted |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
Options
[keywords=STR]- Keywords to search for in the app name or description. If you separate multiple words with spaces, only apps that contain all the words in one field (name or description) are returned. Because the name and description used for the search are based on the locale of the session this command uses internally (fixed to English), the comparison is actually made against the app's English name and English description, case-insensitively.
Output fields
| Field | Type | Description |
|---|---|---|
| code | string | App code |
| name | string | App name |
| bundle_symbolic_name | string | OSGi bundle symbolic name |
| version | string | App version |
| description | string | App description |
| built_at | timestamp | Build time |
| installed_at | timestamp | Installation time |
| enabled | boolean | Whether the app is enabled |
Error codes
Parsing errors
| Error code | Message | Description |
|---|---|---|
| 300181 | No permission to enumerate apps. | Run by an account without administrator permission |
Runtime errors
N/A
Description
The sonar-apps command returns all registered apps if the keywords option is not specified. If keywords is specified, it returns apps where each space-separated word is fully contained in the app name, or fully contained in the app description (an app is included if either the name or the description satisfies the condition, not necessarily both).
This comparison is based on the multilingual name and description, which vary by session locale, but the session this command creates does not specify a locale, so it defaults to English. On the other hand, the name output field returns the app's default name as is, so if an app has a Korean default name set, the name shown on screen and the English name actually used for the keywords search can differ. Therefore, keywords should be given words contained in the app's English name or English description rather than Korean, to reliably match.
Examples
-
Retrieve the full list of apps
sonar-appsReturns the code, name, version, enabled status, and other properties of all registered apps.
-
Filter apps by keyword
sonar-apps keywords="sample"Returns only apps whose English name or description contains
sample. Becausekeywordsis compared based on the session locale (fixed to English), specifying a Korean keyword may not match an app even if it is displayed with a Korean name on screen. -
Query only disabled apps
sonar-apps | search enabled == falseFilters only apps that are currently disabled.
Change history
The sonar-apps command is available in the Sonar 4.0 series starting with 4.0.2609.0, where the command previously provided by the Experimental app was built into Sonar core. On versions without the built-in command, install the Experimental app to use it.