I am trying to query an index from my react application using axios, but I am unable to get the API endpoint link which I should be querying.
const query = {
"query": {
"match_all": {}
}
}
componentDidMount() {
Axios.get('https://API ENDPOINT/.kibana_1/_doc/_search', {
auth: {
username: 'elastic',
password: '******'
},
params: {
source: JSON.stringify(query),
source_content_type: 'application/json'
}
})
.then(
response => console.log(response),
error => console.log(error)
)
}