# REST API

The REST API can be used by starting the gateway with the bayard-rest CLI.
Several APIs are available to manage Bayard over the HTTP. See the following list:

- Get document API
  Get API gets a document with the specified ID.

- Set document API
  Set document API puts a document with the specified ID and field. If specify an existing ID, it will be overwritten with the new document.

- Delete document API
  Delete document API deletes a document with the specified ID.

- Bulk set documents API
  Bulk set API sets documents in bulk with the specified ID and field. If specify an existing ID, it will be overwritten with the new document.

- Bulk delete documents API
  Bulk delete documents API deletes documents in bulk with the specified ID.

- Commit API
  Commit API commits updates made to the index.

- Rollback API
  Rollback API rolls back any updates made to the index to the last committed state.

- Merge API
  Merge API merges fragmented segments in the index.

- Schema API
  Schema API shows the index schema that the server applied.

- Search API
  Search API searches documents from the index.

- Status API
  Status API shows the cluster that the specified server is joining.