Trying to upload data via bulk apis as per tutorial- not working

as per this tutorial: https://www.elastic.co/guide/en/kibana/6.x/tutorial-load-dataset.html

I am trying to upload data from downloaded files in bulk using the following links but it isnt working

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @logs.jsonl

if i copy paste the 'CURL text' in kibana console i get this error

Kibana can not access your files. You can't do that in Kibana. But you can copy and paste the file content in Kibana console under the POST _bulk call and that should work.

I managed to do it via the console but only 1 record at a time. perhaps the documentation can be updated to reflect the correct info for first timers like me. regarding file uploads, i still cant - will try and request my other more tech team members' help. Thanks!

POST _bulk
{"index":{"_index":"shakespeare", "_type" : "doc", "_id":4}}
{"type":"line","line_id":5,"play_name":"Henry IV","speech_number":1,"line_number":"1.1.2","speaker":"KING HENRY IV","text_entry":"Find we a time for frighted peace to pant,"}
{ "update" : {"_id" : "4", "_type" : "doc", "_index" : "shakespeare"} }

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