logzio/logz-docs

Code sample does not contain all the fields described in the Payload

Closed this issue · 1 comments

see:

- lang: cURL
source: >-
curl -X POST https://api.logz.io/v1/search \
-H 'Content-Type: application/json' \
-H 'X-API-TOKEN: <token>' \
-d '{
"size": 10,
"query": {
"bool": {
"must": [{
"range": {
"@timestamp": {
"gte": "now-5m",
"lte": "now"
}
}
}]
}
},
"aggs": {
"byType": {
"terms": {
"field": "type",
"size": 5
}
}
}
}' '

should contain a payload of:

{
	"query": {
		"bool": {
			"must": [{
				"range": {
					"@timestamp": {
						"gte": "now-5m",
						"lte": "now"
					}
				}
			}]
		}
	},
	"from": 10,
	"size": 50,
	"sort": [{}],
	"_source": {
		"includes": "message"
	},
	"post_filter": {},
	"docvalue_fields": {},
	"version": {},
	"store": null,
	"highlight": {},
	"aggregations": {
		"byType": {
			"terms": {
				"field": "type",
				"size": 5
			}
		}
	}
}

Solved