Overview
This article provides details on how to query the Logs & Alerts API to retrieve relevant log and alert data from the JetPatch platform.
The API allows you to filter, sort, and paginate through logs and alerts data programmatically.
The information is based on the Logs & Alerts tab in our "platform configuration" space.
API Specification
| 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"}} {"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 |
Response Data
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
Example Usage
URL full example (size=100 ; sort level = ascending ; details - a new tool)
Comments
0 comments
Please sign in to leave a comment.