Flush the Search Engine API
On this page
Use this API to refresh the User search index, so that changes made immediately before the request appear in search results right away. The search engine refreshes the index about once a second on its own, so most production code doesn't need this API. Tests that change a User and then search for the User can call this API between the two requests. This API applies only to the Elasticsearch search engine. For more information, see Index Delay.
Request#
Issue the flush with a single request that takes no parameters.
OpenAPI Spec
Response#
The response does not contain a body. It only contains one of the status codes below.
| Code | Description |
|---|---|
| 200 | The request succeeded. The response contains a JSON body. |
| 400 | The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present. |
| 401 | FusionAuth didn't authorize the request. The Authorization header is missing, the API key isn't valid, or the API key doesn't have permission for this endpoint and method. The response is empty. For more information, see Unauthorized Responses. |
| 500 | FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response usually contains an Errors JSON object with the [Exception] general error code. On MySQL, a data field larger than the database column also returns 500. For more information, see Data Field Sizes. |
| 503 | The search index is unavailable or returned an error, so FusionAuth can't complete the request. The response contains a JSON body. |
Related
API documentation for the FusionAuth Bulk Delete Users API.
API documentation for the FusionAuth Change a User's Password API.
API documentation for the FusionAuth Create a User API.
API documentation for the FusionAuth Delete a User API.