Error : creation Dashboard with Curl Command ==> Missing kbn-version header

Hi,

I use Kibana version 4. So when i try to create new Dashboard, I have this message at the end :

{"statusCode":400,"error":"Bad Request","message":"Missing kbn-version header"}

Do you how can i put also the kbn-version header , please.

Thanks,

I've not seen that myself. Which version of Kibana 4 are you using... 4.1? 4.4? What exact steps do you take when this error appears? Could you attach a screenshot?

Sorry... I use Kibana 4.3.1 !! Creation directly in the Application are good, but I talk about CURL creation method.

I'm not sure there is a REST endpoint within the Kibana server itself for dashboard creation. However, it should be possible to add this object to the .kibana index by writing directly to Elasticsearch.

1 Like

You shouldn't be accessing the /elasticsearch endpoint in kibana. You can write directly to Elasticsearch itself.

Also, even with the kbn-version header, that URL would not accept a POST to write a dashboard, you need to write directly to the .kibana index.

1 Like

Ok ,I thought for this Method..So I'm going to try directly on ES
Thanks

Hi all,

I have a little problem wtih My Curl Command.

So it means that there are unused Fields ??

Thanks

It works if you add the Kibana version as a header in curl:

-H "kbn-version: 4.4.1"

Hi,

Now i use directly this curl api to input in ElasticSearch (9200 and not Kibana=>5601) , much easier and usual.
But it's right that this method is better too.

So thanks,
Diyal