Hi,
I'm writing here cause I've read through all of the Kibana REST API, but I still have not found an answer to my question REST API | Kibana Guide [8.6] | Elastic
I basically want to access a document in the index, in the same way as the Analytics > Discover function, and I'd like to test the request through Postman. In order to make this kind of request f, from my understanding, we need the following pre-requisites:
-
The right user privileges
What user privileges' do we need in order to make this request? -
The right URL
What URL do we use to access a document as an external user? I couldn't find it anywhere -
The document ID
I found the ID to my index under Discover > Inspect -
A Request Body
I'd like to query for different error types in my applications stack trace. Under Discover > Inspect I found the following request boy:
{
"track_total_hits": false,
"sort": [
{
"@timestamp": {
"order": "desc",
"unmapped_type": "boolean"
}
}
],
"fields": [
{
"field": "@timestamp",
"format": "strict_date_optional_time"
},
{
"field": "error.exception.code"
},
{
"field": "error.exception.handled"
},
{
"field": "error.exception.message"
},
{
"field": "error.exception.module"
},
{
"field": "error.exception.type"
}
],
"size": 500,
"version": true,
"script_fields": {},
"stored_fields": [
"*"
],
"runtime_mappings": {},
"_source": false,
"query": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"should": [
{
"match_phrase": {
"service.name": "adresseserviceprod"
}
}
],
"minimum_should_match": 1
}
},
{
"range": {
"@timestamp": {
"format": "strict_date_optional_time",
"gte": "2023-02-04T23:00:00.000Z",
"lte": "2023-02-07T09:31:19.662Z"
}
}
},
{
"exists": {
"field": "error.exception.type"
}
}
],
"should": [],
"must_not": []
}
},
"highlight": {
"pre_tags": [
"@kibana-highlighted-field@"
],
"post_tags": [
"@/kibana-highlighted-field@"
],
"fields": {
"*": {}
},
"fragment_size": 2147483647
}
}
Does somebody know a solution to this? It feels like it shouldn't be this hard to make a basic call to the index...