/bulkexport/status API

How to poll for status of bulk query exports

You use the /bulkexport/status endpoint to poll for the progress of a bulk export query.

Request

You must specify the tracking UID from the submit request to display the status for the request.

POST /bulkexport/status  
{  
  "id": "{TRACKING UID}"  
}

Response

The status response contains information about the bulk export search request, the export job options, and its progress.

{
   "auth":"root",
   "exportedFilesPath":"web-hosting-bkt/backup/b43a8b1a-13d6-41d0-8cdb-123dcd1a34c9",
   "lastFileAt":1695816263407,
   "message":"Success",
   "searchRequest":{
      "_type":"chaossumo.query.BulkExportQuery.Request.Search.Elastic",
      "dateTime":1695816257549,
      "msearch":{
         "_queryRequestOptions":{
            "options":[
               
            ]
         },
         "close":"???",
         "id":"???",
         "labels":[
            
         ],
         "queryAuthority":{
            "_type":"chaossumo.query.QueryAuthority.Root"
         },
         "queryId":"ffc2a2f2-cf53-44db-90f0-addf06f57c14",
         "request":{
            "body":{
               "query":{
                  "bool":{
                     "must":[
                        {
                           "match":{
                              "elb_status_code":{
                                 "query":404
                              }
                           }
                        },
                        {
                           "range":{
                              "timestamp":{
                                 "gte":"1060473600000",
                                 "lte":"1691711999000"
                              }
                           }
                        }
                     ]
                  }
               }
            },
            "params":{
               
            },
            "target":{
               "indices":"sample-elb-view"
            }
         }
      },
      "options":{
         "bucket":"web-hosting-bkt",
         "compression":"gzip",
         "fileFormat": "JSON"
         "id":"b43a8b1a-13d6-41d0-8cdb-123dcd1a34c9",
         "path":"backup",
         "slice":"e5794bf2-ee52-4e18-8340-cb67edb2c38f",
         "unitFileSize":104857600
      },
      "queryName":"ui-elb-export-test"
   },
   "status":{
      "aggregations":{
         "active":{
            "count":0
         },
         "completed":{
            "count":0
         },
         "failed":{
            "count":0
         },
         "pending":{
            "count":0
         },
         "retries":0,
         "total":{
            "count":0
         }
      },
      "initialBytes":0,
      "joins":{
         "active":{
            "count":0
         },
         "completed":{
            "count":0
         },
         "failed":{
            "count":0
         },
         "pending":{
            "count":0
         },
         "retries":0,
         "total":{
            "count":0
         }
      },
      "partitions":{
         "active":{
            "count":0
         },
         "completed":{
            "count":3
         },
         "failed":{
            "count":0
         },
         "pending":{
            "count":0
         },
         "retries":0,
         "total":{
            "count":3
         }
      },
      "principal":{
         "_type":"chaossumo.query.Principal.BulkExport",
         "passthrough":{
            "_type":"chaossumo.query.Principal.BulkExport",
            "passthrough":{
               "_type":"chaossumo.query.Principal.Root"
            },
            "uniId":"6a1b6945-5e91-483f-801e-0780f02532b6"
         },
         "uniId":"3dae8732-7d47-4fa1-a854-aa8ca97da04d"
      },
      "queryCompleted":true,
      "queryID":"c0365800-873f-4733-be77-315d392c30f9",
      "scheduled":true,
      "segments":{
         "byteSize":438968134,
         "cellCount":18000000,
         "emptyQueryTasks":0,
         "maxChunks":1,
         "rowCount":1000000,
         "scopeTasks":1,
         "totalChunks":2
      },
      "termination":true,
      "timing":{
         "de_time_ms":1556,
         "queue_time_ms":8,
         "retry_time_ms":-3,
         "run_time_ms":1752,
         "total_time_ms":1760
      }
   },
   "totalFilesExported":1
}

RBAC Controls for Status

To submit a bulk export status request, you must be granted permission to use the bulk export status feature via a permission block with the chaos:query:export:status action. Additionally, an optional condition constraint may be included to restrict status to only the jobs created by a specific user (for instance, the current user).

{  
  "Actions": [  
    "chaos:query:export:status"  
  ],  
  "Condition": {  
    "Conditions": [  
      {  
        "Equals": {  
          "chaos:owner/crn": "${chaos:principal/crn}"  
        }  
      }  
    ]  
  },  
  "Effect": "Allow",  
  "Resources": [  
    "*"  
  ],  
  "Version": "1.0"  
}

What’s Next