Commands: How to start or stop indexing and get indexing status?

Following endpoints have been created to enable user to toggle indexing and retrieve indexing status:
- StartIndexing
- StopIndexing
- GetIndexingStatus

StartIndexing

Starts indexing, if it was previously stopped.

Syntax

curl \
	http://{serverName}/databases/{databaseName}/admin/startIndexing? \
	&concurrency={concurrency} \
	-X POST

Request

Query parameter Required Description
concurrency No if set then maximum number of parallel indexing tasks will be set to this value

Response

Status code Description
204 No Content

Example

curl -X POST "http://localhost:8080/databases/NorthWind/admin/StartIndexing" 
< HTTP/1.1 204 No Content

StopIndexing

Stops indexing, if it was running.

Syntax

curl \
	http://{serverName}/databases/{databaseName}/admin/StopIndexing \
	-X POST

Response

Status code Description
204 No Content

Example

curl -X POST "http://localhost:8080/databases/NorthWind/admin/StopIndexing" 
< HTTP/1.1 204 No Content

GetIndexingStatus

Retrieves current status of the indexing.

Syntax

curl -X GET http://{serverName}/databases/{databaseName}/admin/IndexingStatus

Response

Status code Description
200 OK
Return Value Description
IndexingStatus Indexing or Paused

Example

curl -X GET "http://localhost:8080/databases/NorthWind/admin/IndexingStatus" 
< HTTP/1.1 200 OK
{"IndexingStatus":"Indexing"}