Skip to content

Commit 3d642e7

Browse files
authored
Updated the doc with new warning and usageDetails field (#4956)
1 parent d4eb819 commit 3d642e7

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

docs/api/search-job.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ This is the formatted result document:
343343

344344
```json
345345
{
346+
"warning":"",
346347
"state":"DONE GATHERING RESULTS",
347348
"messageCount":90,
348349
"histogramBuckets":[
@@ -356,7 +357,6 @@ This is the formatted result document:
356357
"count":1,
357358
"startTimestamp":1359405480000
358359
},
359-
...
360360
{
361361
"length":60000,
362362
"count":1,
@@ -367,7 +367,10 @@ This is the formatted result document:
367367
],
368368
"pendingWarnings":[
369369
],
370-
"recordCount":1
370+
"recordCount":1,
371+
"usageDetails":{
372+
"dataScannedInBytes":0
373+
}
371374
}
372375
```
373376

@@ -385,12 +388,16 @@ Notice that the state of the sample search job is DONE GATHERING RESULTS. The fo
385388

386389
#### More about results
387390

391+
The **warnings** value contains the detailed information about the warning while obtaining the current status of a search job.
392+
388393
The **messageCount** and **recordCount** values indicate the number of messages and records found or produced so far. Messages are raw log messages and records are aggregated data.
389394

390395
For queries that do not contain an aggregation operator, only messages are returned. If the query contains an aggregation, for example, **count by _sourceCategory**, then the messages are returned along with records resulting from the aggregation (similar to what a SQL database would return).
391396

392397
The **pendingErrors** and **pendingWarnings** values contain any pending error or warning strings that have accumulated since the last time the status was requested.
393398

399+
The **usageDetails** value contains the amount of data scanned in bytes details.
400+
394401
Errors and warnings are not cumulative. If you need to retain the errors and warnings, store them locally.
395402

396403
The **histogramBuckets** value returns a list of histogram buckets. A histogram bucket is defined by its timestamp, which is the start timestamp (in milliseconds) of the bucket, and a length, also in milliseconds, that expressed the width of the bucket. The **timestampplus** length is the end timestamp of the bucket, so the count is the number of messages in the bucket.
@@ -468,6 +475,7 @@ curl -b cookies.txt -c cookies.txt -H 'Accept: application/json'
468475

469476
```json
470477
{
478+
"warning": "",
471479
"fields":[
472480
{
473481
"name":"_messageid",
@@ -595,6 +603,7 @@ curl -b cookies.txt -c cookies.txt -H 'Accept: application/json'
595603

596604
The result contains two lists, **fields** and **messages**.
597605

606+
* ***warnings** contains the detailed information about the warning while paging through the messages found by a search job.
598607
* **fields** contains a list of all the fields defined for each of the messages returned. For each field, the field name and field type are returned.
599608
* **messages** contains a list of maps, one map per message. Each **map** maps from the fields described in the fields list to the actual value for the message.
600609

@@ -666,6 +675,7 @@ This is the formatted result document:
666675

667676
```json
668677
{
678+
"warning": "",
669679
"fields":[
670680
{
671681
"name":"_sourceCategory",
@@ -691,6 +701,8 @@ This is the formatted result document:
691701

692702
The returned document is similar to the one returned for the message paging API. The schema of the records returned is described by the list of fields as part of the fields element. The records themselves are a list of maps.
693703

704+
The ***warnings** contains the detailed information about the warning while paging through the records found by a Search Job.
705+
694706
</details>
695707

696708
## POST Methods
@@ -828,10 +840,12 @@ Example error response:
828840

829841
```json
830842
{
831-
"status" : 400,
832-
"id" : "IUUQI-DGH5I-TJ045",
833-
"code" : "searchjob.invalid.timestamp.from",
834-
"message" : "The 'from' field contains an invalid time."
843+
"warning": "A 404 status (Page Not Found) on a follow-up request may be due to a cookie not accompanying the request",
844+
"id": "IUUQI-DGH5I-TJ045",
845+
"link": {
846+
"rel": "self",
847+
"href": "https://api.sumologic.com/api/v1/search/jobs/IUUQI-DGH5I-TJ045"
848+
}
835849
}
836850
```
837851

0 commit comments

Comments
 (0)