Using curl with bulk API: ActionRequestValidationException Validation Failed: 1: no requests added

Whenever I try to perform a bulk import from CURL, I get an error
stating: ActionRequestValidationException[Validation Failed: 1: no requests
added

Can someone point out my mistake in this command?

$ curl -u username:password -XPOST http://my.es.com:9200/_bulk -d'
{"index":{"_index":"my_index_test","_type":"product","_id":"033fe3db-038f-11e3-a415-bc764e10976c"}}
{"api_id":"033fe3db-038f-11e3-a415-bc764e10976c","name":"tray","short_description":"

serve
fresh things with a fresh look
","long_description":"
serve fresh
things with a fresh
look
","price":19.5,"image_url":"https://s3.amazonaws.com/blah.jpg","barcodes":["CODE_128:tray","CODE_39:tray","MANUAL:tray","MANUAL:TRAY"]}
'

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8c46092e-814f-4f92-ac8f-2a1772721cc8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Check that you have \n after each line (last line needs it as well).

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 16 février 2014 à 21:22:48, pulkitsinghal (pulkitsinghal@gmail.com) a écrit:

Whenever I try to perform a bulk import from CURL, I get an error stating: ActionRequestValidationException[Validation Failed: 1: no requests added

Can someone point out my mistake in this command?

$ curl -u username:password -XPOST http://my.es.com:9200/_bulk -d'
{"index":{"_index":"my_index_test","_type":"product","_id":"033fe3db-038f-11e3-a415-bc764e10976c"}}
{"api_id":"033fe3db-038f-11e3-a415-bc764e10976c","name":"tray","short_description":"
serve fresh things with a fresh look
","long_description":"
serve fresh things with a fresh look
","price":19.5,"image_url":"https://s3.amazonaws.com/blah.jpg","barcodes":["CODE_128:tray","CODE_39:tray","MANUAL:tray","MANUAL:TRAY"]}
'

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8c46092e-814f-4f92-ac8f-2a1772721cc8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53011f68.333ab105.f2%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks, that was it!

On Sunday, February 16, 2014 2:28:24 PM UTC-6, David Pilato wrote:

Check that you have \n after each line (last line needs it as well).

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 16 février 2014 à 21:22:48, pulkitsinghal (pulkit...@gmail.com<javascript:>)
a écrit:

Whenever I try to perform a bulk import from CURL, I get an error
stating: ActionRequestValidationException[Validation Failed: 1: no requests
added

Can someone point out my mistake in this command?

$ curl -u username:password -XPOST http://my.es.com:9200/_bulk -dhttp://my.es.com:9200/_bulk-d
'
{"index":{"_index":"my_index_test","_type":"product","_id":"033fe3db-038f-11e3-a415-bc764e10976c"}}
{"api_id":"033fe3db-038f-11e3-a415-bc764e10976c","name":"tray","short_description":"
serve
fresh things with a fresh look
","long_description":"
serve fresh
things with a fresh look
","price":19.5,"image_url":"
https://s3.amazonaws.com/blah.jpg
","barcodes":["CODE_128:tray","CODE_39:tray","MANUAL:tray","MANUAL:TRAY"]}
'

You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8c46092e-814f-4f92-ac8f-2a1772721cc8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bb022da2-f5bd-4f60-8af1-1423a774bf25%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.