Filter data into kibana dashboard using post method

Hi Team,
I would like to filter out data dynamically using javascript with the help of post method. I have used the a script but getting error in the post method. Attaching the script for your reference.

const kibanaDashboardURL = "";
const postData = {
// Your POST data here, if necessary

fetch(kibanaDashboardURL, {
method: 'POST',
headers: {
'Content-Type': 'application/json', // Adjust the content type if needed
body: JSON.stringify(postData), // Include POST data here
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
return response.text();
.then(data => {
// Handle the data from the Kibana dashboard, if needed
.catch(error => {
console.error('There was a problem with the fetch operation:', error);

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.