Click here to expand

    Results API

    The API allows you fetch the results for the async search/alerts task.

    Request URL

    GET http://localhost:8400/RestAPI/v1/jobs/results

    Request Header

    Header name Value Mandatory Description
    Authorization Bearer {{AuthToken}} Yes

    Request Parameters

    Parameter name Mandatory Type Description
    request_id Yes String request_id of the async search task returned by async endpoint
    page_no No Int if provided fetched particular page number of the result-set

    Response

    The response will be a JSON object which will contain the following key/value pairs

    Parameter name Description
    next_page Next page number of the result set
    results JSON object which contain search hits for the request

    Contains following fields

    • hits: List of search hits
    • hits_count_in_current_page: Hits count in current search response

    Example usage using cURL

    i) Delete status info & hits for particular request_id

    Sample request

    Copy to Clipboard

    curl --location --request GET 'http://localhost:8400/RestAPI/v1/jobs/results?request_id=AYVTeCb0wPH5eWuO5jkC' \ -H "Accept: application/json" -H "Authorization: Bearer mdrkoda0odmtmznloc00ndziltg0mgutmwzkztljmjvmzwmx "

    Sample response:

    Copy to Clipboard

    { "next_page": 5, "results": { "hits": [{ "COMMON_SEVERITY": "INFORMATION", "IS_THROWAWAY": true, "HOSTNAME": "lix", "APPID": 2, "FORMATID": 302, "RAWLOG": "roy.sulivan /event/emberAPI/ELANotificationActions \"https://eventlog.lo [16/Jun/2020:21:13:21 +0530] 15 142 200 \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0\"", "TIME": "1643531422443", "IMPORTED_TIME": 1643531420365, "Url": "https://eventlog.logme.cn/event/index2.do?url=collectorSettings&tab=system&sel=1\"", "IPAddress1": "10.128.156.152", "HOSTID": 601, "IPAddress2": "10.128.156.152" }, { "COMMON_SEVERITY": "INFORMATION", "IS_THROWAWAY": true, "HOSTNAME": "lix", "APPID": 2, "FORMATID": 302, "RAWLOG": "roy.sulivan /event/emberAPI/ELANotificationActions \"https://eventlog.logme.cn/event/index2.do?url=collectorSettings&tab=system&sel=1\" 10.128.156.152 10.128.156.152 POST [16/Jun/2020:21:13:27 +0530] 15 142 200 \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0\"", "TIME": "1643531422446", "IMPORTED_TIME": 1643531420365, "Url": "https://eventlog.logme.cn/event/index2.do?url=collectorSettings&tab=system&sel=1\"", "IPAddress1": "10.128.156.152", "HOSTID": 601, "IPAddress2": "10.128.156.152" }], "hits_count_in_current_page": 2 }, "status": 200 }

    Example usage using Postman (Third party tool)

    i) Get results of async search

    Results API

    ii) Get particular page of results of async search

    Results API

    Don't see what you're looking for?

    •  

      Visit our community

      Post your questions in the forum.

       
    •  

      Request additional resources

      Send us your requirements.

       
    •  

      Need implementation assistance?

      Try onboarding

       
    Get download link