Application Monitor API
The Application Monitor API uses HTTP GET requests with JSON arguments and responses, using api/GetUserAppUsage as the API route.
Navigating to http(s)://<AS_hostname>:<port_number>/analyzer/api/GetUserAppUsage displays all available usage data. The following API query strings can be used for filtering:
Where:
| Variable | Description |
|---|---|
<AS_hostname> | The name of the machine where Open iT Analysis Server is hosted. |
<port_number> | The port number provided during the installation and will be used in the web service. The default value is 80. |
API Query Strings
?username=<user>
This query filters usage data based on a specific <user>.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?username=jsmith
The example shows usage data of the user jsmith.
?application=<application>
This query filters usage data based on a specific <application>.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?application=Petrel
The example shows usage data of Petrel.
?status=<0-4>
This query filters usage data according to its status. The possible status are:
0- Inactive1- Active2- Suspended3- Terminated4- Blocked
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?status=0
The example shows usage data of applications that are inactive.
?status_cond=<filter_condition>
This query works in conjunction with the status query, filtering the data based on the range set on the <filter_condition>. The possible filter condition to use along with the status filter are:
lt- less than (<)gt- greater than (>)lte- less than or equal to (<=)gte- greater than or equal to (>=)
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?status_cond=gt&status=0
The example shows usage data of Active, Suspended, Terminated, and Blocked applications.
?host =<hostname>
This query filters usage data based on a specific <hostname>.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?host=win-host01
The example shows usage data of applications hosted on win-host01.
?features=<feature_name>
This query filters usage data based on a specific <feature_name>.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?features=samplefeature
The example shows usage data of sample feature.
?collect_from=<epoch>&collect_to=<epoch>
This query filters usage data based on the specified data collection <epoch>. Filter the data using either one or both of the range selectors.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?collect_from=1563960600&collect_to=1595583000
The example shows usage data from Wednesday, July 24, 2019 9:30:00 AM (GMT) to Friday, July 24, 2022 9:30:00 AM (GMT).
?start\from=<epoch>&start\to=<epoch>
The query filters usage data based on the <epoch> when the application started. Filter the data using either one or both of the range selectors.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?start_from=1563960600&start_to=1595583000
The example shows usage data of applications that started on Wednesday, July 24, 2019 9:30:00AM (GMT) until Friday, July 24, 2022 9:30:00 AM (GMT).
?activity_change_from=<epoch>&activity_change_to=<epoch>
This query filters usage data based on the <epoch> when the application activity changed (from active to inactive and vice versa). Filter the data using either one or both of the range selectors.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?activity_change_from=1563960600&activity_change_to=1595583000
The example shows usage data of applications whose activity changed from Wednesday, July 24,2019 9:30:00 AM (GMT) until Friday, July 24, 2022 9:30:00 AM (GMT).
?status_change_from =<epoch>&status_change_to=<epoch>
This query filters usage data based on the <epoch> when the application status changed (to suspended or terminated). Filter the data using either one or both of the range selectors.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?status_change_from=1563960600&status_change_to=1595583000
The example shows usage data of applications whose status changed from Wednesday, July 24,2019 9:30:00 AM (GMT) until Friday, July 24, 2022 9:30:00 AM (GMT).
Joining Queries
Join query filters using the ampersand (&) symbol to further filter usage data.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?username=jsmith&application=Petrel&host=win-host01
This shows usage data for the application Petrel on the host win-host01, whose user is jsmith.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?username=jsmith&application=OpenWorks&status=3
This shows usage data for the application OpenWorks, that is currently terminated, whose user is jsmith.
http(s)://<AS_hostname>:<port_number>/api/GetUserAppUsage?username=jsmith&features=XTRACT&status_cond=gt&status=2
This shows jsmith usage data for the feature XTRACT that is currently terminated or blocked.