1

i am new to elastic search trying to bulk import accounts.json file with curl command. but every time got error URL not specified. elasticsearch and kibana folder are on desktop and also accounts.json file also on desktop.

here is the curl command with error

desktop user$ curl -H 'Content-Type: application/json' -XPOST'localhost:9200/bank/_bulk?pretty&refresh' --data-binary '@accounts.json'

curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information

please help

Amit
  • 30,756
  • 6
  • 57
  • 88
Coder-91
  • 23
  • 5

1 Answers1

1

You need to use this command to bulk import data:

 curl -H 'Content-Type: application/json' -XPOST 'localhost:9200/index-name/_bulk?pretty' --data-binary @my_newline_json.json

Make sure that you have correctly specified the path of your json file in the curl command

Refer to this answer, to know more about this.

ESCoder
  • 15,431
  • 2
  • 19
  • 42