Starting from JetPatch version 4.1.2 all logs & alerts details are available through our REST-API.
The following provides you details on how to query the Logs & Alerts and retrieve relevant data.
The information is based on the Logs & Alerts tab in our "platform configuration" space.
URL |
<host>/vmanage-server/rest/rest-api/logs-and-alerts |
Encoding | Each of the possible URL parameter values has to be encoded using a URL encoder tool, for example: https://meyerweb.com/eric/tools/dencoder/ |
Permissions | Any logged in user |
Sort |
sort may be omitted. {"level":"ASCENDING"} encoded -> %7B%22level%22%3A%22ASCENDING%22%7D |
Query |
Level (Type Column) can be on of the following:
{"level":{"$in":["ERROR","INFO"]}} encoded -> %7B%22level%22%3A%7B%22%24in%22%3A%5B%22ERROR%22%2C%22INFO%22%5D%7D%7D
|
Server {"vmName":{"$like_nocase":"NAU"}} |
|
Description {"message":{"$like_nocase":"collect"}} |
|
Details {"details":{"$like_nocase":"A new Tool"}} |
|
User {"user":{"$eq":"admin"}} |
|
Timestamp ('Time & Date' column) {"timestamp":{"$gte":1616536800000, "$lte":1616623259000}} |
|
Page - Page number to retrieve page=0 |
|
Size
size=100 |
Returning data will include in addition to the records the following parameters:
- total- How many records exist in total for the given query
- hardLimit- maximum possible query size
URL full example (size=100 ; sort level = ascending ; details - a new tool)
Postman output example:
Comments
0 comments
Please sign in to leave a comment.