Skip to content

Transactions

Transactions are used to group write operations into a single atomic operation. This is useful for ensuring that all operations are successful or none are and for handling errors states in your application. If your index has auto commit enabled you do not need to use transactions. If you utilize an CMS integration these are handled for you.

API Endpoints

  • POST /index/:index/commit Commits a write transaction.
  • POST /index/:index/rollback Rollback a write transaction.

Auth Requirement

Requires an authentication key that has ingestion permissions.

Notes

There is no json payload for these endpoint operations.

CAUTION

Only one remote system should write to an index at a time. If multiple systems are writing to an index then all pending writes will be applied to the index when the the next commit is made.

Transactions are implicit. You do not need to manually create a transaction. You may execute a transaction by starting a write operation and then committing it. Once committed a transaction can’t be rolled back. You may however delete individual documents from an index.