Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

wmalik avatar image
wmalik asked ·

Are multiple inserts supported through the REST API?

I want to send multiple records to insert in a table in single REST API call to Cassandra. Does datastax api service allow this? If yes, please share sample request JSON

stargate
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

Inserting multiple records is not supported with the REST API because it will overload the coordinator and is inefficient as far as throughput goes. The same mechanism is not recommended with the native CQL protocol since it achieves the opposite of the outcome you're after.

We recommend making multiple requests for each insert operation to maximise throughput and performance of the cluster. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.