Log scroll search endpoints in the REST API


Use the scroll search REST API to retrieve large sets of results from a single scrolling search request. This API can scroll and return multiple results page by page. You can search for logs for specific criteria and time ranges by using a search query with scroll support. Unlike the msearch request, you can retrieve multiple search pages by using scroll search.


POST/logs/search
Scroll search
Request URL
/logs-service/api/v1.0/logs/search
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/search
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>
Request body
{
  valid JSON to search logs
}


Example request body

{
  
"scroll_id": "FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFkxQUHVXYzBuUTN1eldIZnNBOGhiQXcAAAAAAAXJVxY4c1pGY2lQT1IwbUFvTUFBMEZGeXN3",
  
"scroll": "1m",
  
"size": 10,
  
"query": {
    
"bool": {
      
"must": [],
      
"filter": [
        {
          "bool": {
            "should": [
              {
                "match": {
                  "Host": "fb-1234"
                }
              }
           ],
            
"minimum_should_match": 1
          
}
        
},
        
{
          
"range": {
            
"@timestamp": {
              
"gte": "2023-12-24T12:15:20.886Z",
              
"lte": "2024-01-24T12:15:20.886Z",
              
"format": "strict_date_optional_time"
            
}
          
}
        
}
      
],
      
"should": [],
      
"must_not": []
    
}
  
}
}


Parameter details


Response codes

Code

Description

200

Log scroll search is successful. Returns search response.

400

Error for invalid data. Check if all input values are valid.

401

Authorization failure. Verify JWT.

404

Scroll ID not found.

500

Unexpected condition encountered. Contact BMC Support.

Back to top



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*