Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

XPLG exposes a URL based API to the users. The API exposes a set of HTTP/S calls that can be used to retrieve information from XPLG:.
The article describes the syntax calls with the available parameters.

Background

XPLG’s API provides multiple calls to the system to get data, export dashboard, query the configuration and more.
The call are done via URL over HTTP/S.
In case security is activated in XPLG (login is required) then using the URL based API will require passing user's credentials in order to login into the system prior to executing the API command.
It is required to pass the username and password in the URL to XPLG in order to get the command executed.

Add to each link that is detailed below at the end: 
&autoLogin=true&username=[USER_NAME]&password=[PASSWORD]

[USER_NAME] = the user name which the API will use to login  
[PASSWORD] =  the password of the user name

...

API Endpoints


URL that returns events from XPLG Search in XML/CSV format

Runs a search query on a specified time frame and returns results in CSV or XML format

URL that returns a Dashboards latest result in PDF format

Returns a dashboard from XPLG in PDF

URL to open Search console on an executed search query

Opens the XPLG search console on a search result page

URL that returns Collected Data Information

URL that returns the Folders and Logs information

URL that returns a specific log's information

URL that returns multiple log's information

Security

In case security is activated in XPLG (login is required) then using the URL based API will require passing user's credentials in order to login into the system prior to executing the API command.
It is required to pass the username and password in the URL to XPLG in order to get the command executed.

...

Returns information about the data that is collected by the system in JSON format

URL that returns the Folders and Logs information

Returns the existing Folders and Logs structure from XPLG in JSON format

URL that returns a specific log's information

Returns information about specific log in XPLG in JSON format

URL that returns multiple log's information

Returns information about multiple logs in XPLG in JSON format

...

Anchor
XPLGAPI-Events
XPLGAPI-Events

URL that returns events from XPLG Search in XML/CSV format

...

http://localhost:30303/logeye/view/api/widgetAPI.jsp?widgetId=searchAPI&searchQuery=*%20in%20app.Windows%20Event%20Logs%20|%20count%20|%20group%20by%20event&fixedInterval=last7Days&maxNumOfRecords=1000&resultFormat=csv&autoLogin=true&username=admin&password=admin

Anchor
XPLGAPI-Dashboard
XPLGAPI-Dashboard

URL that returns a Dashboards latest result in PDF format

...

http://localhost:30303/logeye/view/api/dashboardAPI.jsp?action=export&appName=App-1&viewName=Dashboard-1

Anchor
XPLGAPI-Search
XPLGAPI-Search

URL to open Search console on an executed search query

...

http://localhost:30303/logeye/search/view/loadSearchModel.jsp?searchQuery=error&fixedInterval=last7Days

Anchor
XPLGAPI-DataInfo
XPLGAPI-DataInfo

URL that returns Collected Data Information

  1. http://[MACHINE_NAME]:[XPLG_PORT]/logeye/message/messageJsonApi.jsp?api=collectedDataInfo&type=[see item 2]&timeFrame=[see item 3]&detailsLevel=[see item 4]&maxNumberOfResults=[see item 5]

  2. type = fixed string values: AppTags / Folders (default = Folders)

  3. timeFrame  = fixed string values: last15Minutes, last30Minutes, last60Minutes, last3Hours, last12Hours, last24Hours, last7Days, last14Days, last1Months, last6Months, currentDay, previousDay, currentWeek, previousWeek, allData (default = last24Hours)

  4. detailsLevel  = fixed string values: Basic, Detailed

    1. Basic – returns a JSON specifying: AppTag/Folder based on specified type with AppTag/Folder name, number of defined log and number of collected logs.

      Examples:

      http://localhost:30303/logeye/message/messageJsonApi.jsp?api=collectedDataInfo&type=Folders&timeFrame=last24Hours&detailsLevel=Basic&autoLogin=true&username=admin&password=admin

      Result JSON:
      {"data":{"collectionData":[{"totalLogs":12,"Folders":"XPLG System Logs","collectedLogs":5},{"totalLogs":1,"Folders":"Example Applications,WebLogic 10.0,xplg","collectedLogs":0},{"totalLogs":7,"Folders":"Example Logs","collectedLogs":0},{"totalLogs":5,"Folders":"Linux OS","collectedLogs":4},{"totalLogs":9,"Folders":"Demo,Tomcat,TX_EXAMPLE","collectedLogs":0},{"totalLogs":5,"Folders":"XPLG EC2,jet.XPLG.com,Linux OS","collectedLogs":4},{"totalLogs":4,"Folders":"ID,Tomcat","collectedLogs":3},{"totalLogs":9,"Folders":"WebSphere,Profiles,Server","collectedLogs":0},{"totalLogs":1,"Folders":"Example Applications,WebSphere 6.1.0.0","collectedLogs":0},{"totalLogs":1,"Folders":"CloudXPLG","collectedLogs":0}]}}

      http://localhost:30303/logeye/message/messageJsonApi.jsp?api=collectedDataInfo&type=AppTags&timeFrame=last24Hours&detailsLevel=Basic&autoLogin=true&username=admin&password=admin

      Result JSON:

      Code Block
      {"data":{"collectionData":[{"totalLogs":1,"collectedLogs":0,"AppTags":"Tomcat 5.0.28"},{"totalLogs":22,"collectedLogs":0,"AppTags":"PrudentialA"},{"totalLogs":1,"collectedLogs":0,"AppTags":"XplgWiki"},
      {"totalLogs":4,"collectedLogs":3,"AppTags":"Tomcat"},{"totalLogs":1,"collectedLogs":0,"AppTags":"LogLoud"},{"totalLogs":11,"collectedLogs":0,"AppTags":"DASTLab"},{"totalLogs":10,"collectedLogs":0,"AppTags":"Example AppTag"},
      {"totalLogs":9,"collectedLogs":0,"AppTags":"XPLG"},{"totalLogs":2,"collectedLogs":1,"AppTags":"Website"},{"totalLogs":1,"collectedLogs":0,"AppTags":"LabA_LoadTest"},
      {"totalLogs":1,"collectedLogs":0,"AppTags":"Audit"},{"totalLogs":24,"collectedLogs":0,"AppTags":"AppFinTech_LoadLabA"},{"totalLogs":19,"collectedLogs":8,"AppTags":"Linux"},{"totalLogs":5,"collectedLogs":4,"AppTags":"Linux OS"},
      {"totalLogs":7,"collectedLogs":0,"AppTags":"Weblogic 10.0"},{"totalLogs":10,"collectedLogs":0,"AppTags":"VOLoadTesting"},{"totalLogs":2,"collectedLogs":0,"AppTags":"Log4J"},
      {"totalLogs":1,"collectedLogs":0,"AppTags":"JET-XPLG"},{"totalLogs":9,"collectedLogs":0,"AppTags":"WebSphere 6.1"},{"totalLogs":21,"collectedLogs":11,"AppTags":"ID"}]}}
      
      
    2. Detailed –  returns a JSON specifying: AppTag/Folder based on specified type, number of defined logs, number of collected logs and a list of uncollected logs with their sizes in bytes (comma separated full Folders path in XPLG Folders and Logs tree).

      Examples:

      http://localhost:30303/logeye/message/messageJsonApi.jsp?api=collectedDataInfo&type=Folders&timeFrame=last24Hours&detailsLevel=Detailed&maxNumberOfResults=10&autoLogin=true&username=admin&password=admin

      Result JSON:
      {"data":{"collectionData":[{"totalLogs":1,"Folders":"JS.Logloud","collectedLogs":0,"unCollectedLogsData":[{"path":"JS.Logloud,JS.Logloud","dataSize":250}]},{"totalLogs":1,"Folders":"AWS ELB","collectedLogs":0,"unCollectedLogsData":[{"path":"AWS ELB,elasticloadbalancing","dataSize":3161841}]},{"totalLogs":9,"Folders":"Demo,Tomcat,TX_EXAMPLE","collectedLogs":0,"unCollectedLogsData":[{"path":"Demo,Tomcat,TX_EXAMPLE,IMPACS_BookingInterface-IMPACS_LoanBooking_ReqRep","dataSize":104619},{"path":"Demo,Tomcat,TX_EXAMPLE,ICV_Customer_Interface--ICV_Customer_Search_Response","dataSize":1482923},{"path":"Demo,Tomcat,TX_EXAMPLE,IMPACS_BookingInterface-IMPACS_LoanBooking_Status","dataSize":70679},{"path":"Demo,Tomcat,TX_EXAMPLE,NAIT_AFS_BookingInterface--AFS_LP_BookingInterface_ResponseMessage","dataSize":450876},{"path":"Demo,Tomcat,TX_EXAMPLE,NAIT_AFS_BookingInterface--LP_AFS_BookingInterface_RequestMessage","dataSize":374061},{"path":"Demo,Tomcat,TX_EXAMPLE,ICV_Customer_Interface--ICV_Get_Customer_Request","dataSize":900789},{"path":"Demo,Tomcat,TX_EXAMPLE,ICV_Customer_Interface--ICV_Get_Customer_Response","dataSize":865204},{"path":"Demo,Tomcat,TX_EXAMPLE,NESS-LPNameRequesttoNESS","dataSize":4298295},{"path":"Demo,Tomcat,TX_EXAMPLE,NESS-NESSNameResponsetoLP","dataSize":6681574}]},{"totalLogs":4,"Folders":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1","collectedLogs":0,"unCollectedLogsData":[{"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,http_error","dataSize":6201816},{"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,http_access","dataSize":1411665},{"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,SystemErr","dataSize":178297},{"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,SystemOut","dataSize":663867}]},{"totalLogs":2,"Folders":"Demo,MySQL","collectedLogs":0,"unCollectedLogsData":[{"path":"Demo,MySQL,mysqld-instance-1","dataSize":184975},{"path":"Demo,MySQL,mysqld-instance-2","dataSize":8235}]},{"totalLogs":2,"Folders":"Example Applications,WebLogic 10.0,wl_server,examplesServer","collectedLogs":0,"unCollectedLogsData":[{"path":"Example Applications,WebLogic 10.0,wl_server,examplesServer,examplesServer","dataSize":1003895},{"path":"Example Applications,WebLogic 10.0,wl_server,examplesServer,access","dataSize":698}]},{"totalLogs":1,"Folders":"WebApp Logs,LogLooud","collectedLogs":0,"unCollectedLogsData":[{"path":"WebApp Logs,LogLooud,LogLooud","dataSize":1305}]},{"totalLogs":2,"Folders":"Demo,Linux,instance1","collectedLogs":0,"unCollectedLogsData":[{"path":"Demo,Linux,instance1,messages","dataSize":86974743},{"path":"Demo,Linux,instance1,Mail","dataSize":23821324}]}]}}

      http://localhost:30303/logeye/message/messageJsonApi.jsp?api=collectedDataInfo&type=AppTags&timeFrame=last24Hours&detailsLevel=Detailed&maxNumberOfResults=10&autoLogin=true&username=admin&password=admin

      Result JSON:

      {"data":{"collectionData":[{"totalLogs":1,"collectedLogs":0,"unCollectedLogsData":[{"path":"Example Applications,Tomcat 5.0.28,localhost_log","dataSize":103891}],"AppTags":"Tomcat 5.0.28"},
      {"totalLogs":1,"collectedLogs":0,"unCollectedLogsData":[{"path":"JS.Logloud,JS.Logloud","dataSize":250}],"AppTags":"JS.Logloud"},
      {"totalLogs":9,"collectedLogs":0,"unCollectedLogsData":[{"path":"Demo,Tomcat,TX_EXAMPLE,IMPACS_BookingInterface-IMPACS_LoanBooking_ReqRep","dataSize":104619},
      {"path":"Demo,Tomcat,TX_EXAMPLE,ICV_Customer_Interface--ICV_Customer_Search_Response","dataSize":1482923},{"path":"Demo,Tomcat,TX_EXAMPLE,IMPACS_BookingInterface-IMPACS_LoanBooking_Status","dataSize":70679},
      {"path":"Demo,Tomcat,TX_EXAMPLE,NAIT_AFS_BookingInterface--AFS_LP_BookingInterface_ResponseMessage","dataSize":450876},
      {"path":"Demo,Tomcat,TX_EXAMPLE,NAIT_AFS_BookingInterface--LP_AFS_BookingInterface_RequestMessage","dataSize":374061},
      {"path":"Demo,Tomcat,TX_EXAMPLE,ICV_Customer_Interface--ICV_Get_Customer_Request","dataSize":900789},{"path":"Demo,Tomcat,TX_EXAMPLE,ICV_Customer_Interface--ICV_Get_Customer_Response","dataSize":865204},
      {"path":"Demo,Tomcat,TX_EXAMPLE,NESS-LPNameRequesttoNESS","dataSize":4298295},{"path":"Demo,Tomcat,TX_EXAMPLE,NESS-NESSNameResponsetoLP","dataSize":6681574}],"AppTags":"AppFinTech_LoadLabA"},
      {"totalLogs":14,"collectedLogs":5,"unCollectedLogsData":[{"path":"Demo,Linux,instance1,messages","dataSize":86974743},{"path":"Demo,Linux,instance1,Mail","dataSize":23821324},{"path":"ID,OS,log,boot","dataSize":0},
      {"path":"ID,OS,log,dracut","dataSize":0},{"path":"ID,OS,log,yum","dataSize":0},{"path":"ID,OS,log,tomcat,catalina log","dataSize":0},{"path":"ID,OS,log,tomcat,catalina out","dataSize":0},
      {"path":"ID,OS,log,tomcat,localhost","dataSize":0},{"path":"ID,OS,log,tomcat,localhost_access_log","dataSize":0}],"AppTags":"Linux"},
      {"totalLogs":1,"collectedLogs":0,"unCollectedLogsData":[{"path":"CloudXPLG,log,apt,history.log","dataSize":0}],"AppTags":"DASTLab"},
      {"totalLogs":3,"collectedLogs":0,"unCollectedLogsData":[{"path":"Example Applications,WebLogic 10.0,wl_server,examplesServer,examplesServer","dataSize":1003895},
      {"path":"Example Applications,WebLogic 10.0,wl_server,examplesServer,access","dataSize":698},{"path":"Example Applications,WebLogic 10.0,xplg,xplg","dataSize":8033}],"AppTags":"Weblogic 10.0"},
      {"totalLogs":1,"collectedLogs":0,"unCollectedLogsData":[{"path":"CloudXPLG,log,apt,history.log","dataSize":0}],"AppTags":"VOLoadTesting"},
      {"totalLogs":9,"collectedLogs":0,"unCollectedLogsData":[{"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,http_error","dataSize":6201816},
      {"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,http_access","dataSize":1411665},{"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,SystemErr","dataSize":178297},
      {"path":"Example Applications,WebSphere 6.1.0.0,AppSrv01,SERVERWINNode01,server1,SystemOut","dataSize":663867},{"path":"Example Applications,WebSphere 6.1.0.0,WebSphere Merge Log Example","dataSize":0},
      {"path":"Example Applications,WebSphere 6.1.0.0,AppSrv02,SERVERWINNode02,server1,http_error","dataSize":3100908},
      {"path":"Example Applications,WebSphere 6.1.0.0,AppSrv02,SERVERWINNode02,server1,http_access","dataSize":1411665},
      {"path":"Example Applications,WebSphere 6.1.0.0,AppSrv02,SERVERWINNode02,server1,SystemErr","dataSize":89095},
      {"path":"Example Applications,WebSphere 6.1.0.0,AppSrv02,SERVERWINNode02,server1,SystemOut","dataSize":67255}],"AppTags":"WebSphere 6.1"},
      {"totalLogs":12,"collectedLogs":5,"unCollectedLogsData":[{"path":"ID,OS,log,boot","dataSize":0},{"path":"ID,OS,log,dracut","dataSize":0},{"path":"ID,OS,log,yum","dataSize":0},
      {"path":"ID,OS,log,tomcat,catalina log","dataSize":0},{"path":"ID,OS,log,tomcat,catalina out","dataSize":0},{"path":"ID,OS,log,tomcat,localhost","dataSize":0},
      {"path":"ID,OS,log,tomcat,localhost_access_log","dataSize":0}],"AppTags":"ID"}]}}

  5. maxNumberOfResults = number, max number of results to return. Relevant only when ‘Detailed’ type is specified (default = 100)

Anchor
XPLGAPI-FoldersAndLogsInfo
XPLGAPI-FoldersAndLogsInfo

URL that returns Folders and Logs information

...

Name = the name of the object in the Folders and Logs tree
id = the id in XPLG of object in the Folders and Logs tree
description = the description of the object in the Folders and Logs tree
type = the type (log/folder) of the object in the Folders and Logs tree

* For each Folder - if there are subfolders / logs then they will be listed indicated by hasChildrens = true and children JSON object with the details.

Anchor
XPLGAPI-LogInfo
XPLGAPI-LogInfo

URL that returns a specific log's information

...

type = the type of log
id = the id of the log in XPLG
name = the name of the log in XPLG
description = the description of the log in XPLG
path = the Folders and Logs path of the log in XPLG
appTags = the appTags that the log is tagged to (if applicable)
collectionPolicy = the name of the collection policy that the log is part of
patterns = the data patterns applied on the log
filesPath = the absolute path to the files that the log is defined on, separated by @#@# if there are multiple locations configured (if applicable)
accountName = the name of the account that the log is using (if applicable)
charSet = the char-set applied on the log
timeZone = the time zone applied on the log
dataFilterQuery = the data filter query applied on the log (if applicable)

Anchor
XPLGAPI-LogsDetailedInfo
XPLGAPI-LogsDetailedInfo

URL that returns multiple log's information

...