0

I am trying to copy .json file to kibana but whenever I try to copy using terminal I am getting this error

Warning: Couldn't read data from file "test-data.json", this makes an empty 
Warning: POST.
 {"error":{"root_cause":[{"type":"parse_exception","reason":"request body is required"}],"type":"parse_exception","reason":"request body is required"},"status":400}

I am running this command on terminal

$ curl -H "Content-Type application/x-ndjson" -XPOST http://localhost:9200/items/_bulk --data-binary @test-data.json
LhasaDad
  • 1,786
  • 1
  • 12
  • 19
user5474425
  • 115
  • 1
  • 9
  • is the data shareable? can you post the JSON here? – LhasaDad Sep 24 '20 at 12:56
  • This thread might help: https://stackoverflow.com/a/33340234/4604579 (you need to make sure your JSON file has the required format to send to the bulk endpoint) – Val Sep 24 '20 at 13:21
  • Generally links to random data locations is discouraged. Suggest a GitHub gist – LhasaDad Sep 24 '20 at 13:42
  • Note the original message is telling you that the test-data.json file was not readable. check the name of the file, make sure its in the current working directory or the file name is the absolute path. also check permissions to make sure the file is visible to the process running to post it. – LhasaDad Sep 27 '20 at 01:11

0 Answers0