> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/api-references/api-guides/configuration/indexing-service/api-reference/reindex.md).

# Reindex

## Reindex

> Triggers indexing process of products for the tenant. The reindex works with a \`FULL\` mode - all products are reindexed.\
> \
> This endpoint is marked as deprecated. Use the \[Creating reindex job]\(<https://developer.emporix.io/api-references/api-guides/configuration/indexing-service/api-reference/reindex#post-indexing-tenant-reindex-jobs>) endpoint instead.

```json
{"openapi":"3.0.0","info":{"title":"Indexing Service","version":"v1"},"tags":[{"name":"Reindex"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["indexing.search_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"indexing.search_view":"Needed to read an index provider configuration","indexing.search_manage":"Needed to manage an index provider configuration"}}}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"code":{"description":"Original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"status":{"description":"Classification of the error type","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"type":"array","description":"Error details","items":{"type":"string"}}}},"Reindex":{"title":"Reindex","type":"object","properties":{"mode":{"type":"string","enum":["FULL"],"description":"Indicates reindex mode. Supported modes: `FULL`."}}}}},"paths":{"/indexing/{tenant}/reindex":{"post":{"deprecated":true,"summary":"Reindex","operationId":"POST-indexing-reindex","responses":{"204":{"description":""},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"}},"tags":["Reindex"],"description":"Triggers indexing process of products for the tenant. The reindex works with a `FULL` mode - all products are reindexed.\n\nThis endpoint is marked as deprecated. Use the [Creating reindex job](https://developer.emporix.io/api-references/api-guides/configuration/indexing-service/api-reference/reindex#post-indexing-tenant-reindex-jobs) endpoint instead.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reindex"}}}}}}}}
```

## Retrieving reindex jobs

> Returns reindex jobs.

```json
{"openapi":"3.0.0","info":{"title":"Indexing Service","version":"v1"},"tags":[{"name":"Reindex"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["indexing.search_view"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"indexing.search_view":"Needed to read an index provider configuration","indexing.search_manage":"Needed to manage an index provider configuration"}}}}},"parameters":{"qParam":{"in":"query","name":"q","description":"A standard query parameter is used to search for specific values.\n\nSee: [Standard Practices - Query parameter](https://developer.emporix.io/docs/content/q-param)\n","schema":{"type":"string"}},"pageSize":{"schema":{"type":"integer","default":60,"minimum":1,"maximum":2000},"in":"query","name":"pageSize","description":"The number of documents to be retrieved per page."},"pageNumber":{"schema":{"type":"integer","default":1,"minimum":1},"in":"query","name":"pageNumber","description":"The page number to be retrieved. The size of the pages should be specified by the `pageSize` parameter."},"sort":{"schema":{"type":"string"},"in":"query","name":"sort","description":"List of properties used to sort the results, separated by colons."},"fields":{"schema":{"type":"string"},"in":"query","name":"fields","description":"Fields to be returned in the response."},"header_xTotalCount":{"schema":{"type":"boolean"},"in":"header","name":"X-Total-Count","description":"Flag indicating whether the total number of retrieved results should be returned."}},"schemas":{"ReindexJob":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the reindex job."},"entityType":{"$ref":"#/components/schemas/ReindexEntityType"},"message":{"type":"string","description":"In case if reindex job finishes with `FAILURE` status, the message is populated with information what was the reason of the failure."},"status":{"$ref":"#/components/schemas/ReindexJobStatus"},"metadata":{"$ref":"#/components/schemas/Metadata"}}},"ReindexEntityType":{"type":"string","description":"Entity type which should be reindexed. For now, it supports only `PRODUCT` and custom schema types."},"ReindexJobStatus":{"type":"string","description":"Informs about status of reindex job. `PENDING` means that the maximum number of parallel `IN_PROGRESS` jobs is reached and such job will be processed when one of current `IN_PROGRESS` jobs is released.","enum":["FAILURE","IN_PROGRESS","PENDING","SUCCESS"]},"Metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the object was created. The value is approved as an ISO-8601 representation of an Instant. For example: `2022-04-30T13:18:02.379Z`","type":"string","format":"date-time"},"modifiedAt":{"description":"Date and time when the object was last modified. The value is approved as an ISO-8601 representation of an Instant. For example: `2022-04-30T13:18:02.379Z`","type":"string","format":"date-time"}}},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"code":{"description":"Original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"status":{"description":"Classification of the error type","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"type":"array","description":"Error details","items":{"type":"string"}}}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/indexing/{tenant}/reindex-jobs":{"get":{"parameters":[{"$ref":"#/components/parameters/qParam"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/pageNumber"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/header_xTotalCount"}],"summary":"Retrieving reindex jobs","operationId":"GET-indexing-reindex-jobs","responses":{"200":{"description":"Reindex jobs are returned.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReindexJob"}}}}},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"}},"tags":["Reindex"],"description":"Returns reindex jobs."}}}}
```

## Creating a reindex job

> Triggers indexing process of given entities for the tenant. The reindex works with a \`FULL\` mode - all entities are reindexed. It returns a reindex job which allows to track the progress. The \`SUCCESS\` means that all entities events are published, but process of their indexing in Algolia or RAG can take more time.

```json
{"openapi":"3.0.0","info":{"title":"Indexing Service","version":"v1"},"tags":[{"name":"Reindex"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["indexing.search_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"indexing.search_view":"Needed to read an index provider configuration","indexing.search_manage":"Needed to manage an index provider configuration"}}}}},"schemas":{"ReindexJob":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the reindex job."},"entityType":{"$ref":"#/components/schemas/ReindexEntityType"},"message":{"type":"string","description":"In case if reindex job finishes with `FAILURE` status, the message is populated with information what was the reason of the failure."},"status":{"$ref":"#/components/schemas/ReindexJobStatus"},"metadata":{"$ref":"#/components/schemas/Metadata"}}},"ReindexEntityType":{"type":"string","description":"Entity type which should be reindexed. For now, it supports only `PRODUCT` and custom schema types."},"ReindexJobStatus":{"type":"string","description":"Informs about status of reindex job. `PENDING` means that the maximum number of parallel `IN_PROGRESS` jobs is reached and such job will be processed when one of current `IN_PROGRESS` jobs is released.","enum":["FAILURE","IN_PROGRESS","PENDING","SUCCESS"]},"Metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the object was created. The value is approved as an ISO-8601 representation of an Instant. For example: `2022-04-30T13:18:02.379Z`","type":"string","format":"date-time"},"modifiedAt":{"description":"Date and time when the object was last modified. The value is approved as an ISO-8601 representation of an Instant. For example: `2022-04-30T13:18:02.379Z`","type":"string","format":"date-time"}}},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"code":{"description":"Original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"status":{"description":"Classification of the error type","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"type":"array","description":"Error details","items":{"type":"string"}}}},"ReindexRequest":{"type":"object","properties":{"entityType":{"$ref":"#/components/schemas/ReindexEntityType"},"rag":{"type":"boolean","default":false,"description":"Whether products should be reindexed for RAG. This property is applicable only when `entityType` is `PRODUCT`."}},"required":["entityType"]}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/indexing/{tenant}/reindex-jobs":{"post":{"summary":"Creating a reindex job","operationId":"POST-indexing-reindex-jobs","responses":{"200":{"description":"The reindex job for given entityType was already `IN_PROGRESS` and it is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexJob"}}}},"201":{"description":"The new reindex job was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexJob"}}}},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"}},"tags":["Reindex"],"description":"Triggers indexing process of given entities for the tenant. The reindex works with a `FULL` mode - all entities are reindexed. It returns a reindex job which allows to track the progress. The `SUCCESS` means that all entities events are published, but process of their indexing in Algolia or RAG can take more time.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexRequest"}}}}}}}}
```

## Retrieving a reindex job

> Returns reindex job.

```json
{"openapi":"3.0.0","info":{"title":"Indexing Service","version":"v1"},"tags":[{"name":"Reindex"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["indexing.search_view"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"indexing.search_view":"Needed to read an index provider configuration","indexing.search_manage":"Needed to manage an index provider configuration"}}}}},"parameters":{"fields":{"schema":{"type":"string"},"in":"query","name":"fields","description":"Fields to be returned in the response."}},"schemas":{"ReindexJob":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the reindex job."},"entityType":{"$ref":"#/components/schemas/ReindexEntityType"},"message":{"type":"string","description":"In case if reindex job finishes with `FAILURE` status, the message is populated with information what was the reason of the failure."},"status":{"$ref":"#/components/schemas/ReindexJobStatus"},"metadata":{"$ref":"#/components/schemas/Metadata"}}},"ReindexEntityType":{"type":"string","description":"Entity type which should be reindexed. For now, it supports only `PRODUCT` and custom schema types."},"ReindexJobStatus":{"type":"string","description":"Informs about status of reindex job. `PENDING` means that the maximum number of parallel `IN_PROGRESS` jobs is reached and such job will be processed when one of current `IN_PROGRESS` jobs is released.","enum":["FAILURE","IN_PROGRESS","PENDING","SUCCESS"]},"Metadata":{"type":"object","properties":{"createdAt":{"description":"Date and time when the object was created. The value is approved as an ISO-8601 representation of an Instant. For example: `2022-04-30T13:18:02.379Z`","type":"string","format":"date-time"},"modifiedAt":{"description":"Date and time when the object was last modified. The value is approved as an ISO-8601 representation of an Instant. For example: `2022-04-30T13:18:02.379Z`","type":"string","format":"date-time"}}},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"code":{"description":"Original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"status":{"description":"Classification of the error type","type":"string"},"message":{"description":"Descriptive error message for debugging","type":"string"},"details":{"type":"array","description":"Error details","items":{"type":"string"}}}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/indexing/{tenant}/reindex-jobs/{reindexJobId}":{"get":{"parameters":[{"$ref":"#/components/parameters/fields"}],"summary":"Retrieving a reindex job","operationId":"GET-indexing-reindex-jobs-reindex-job-id","responses":{"200":{"description":"Reindex job is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexJob"}}}},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"}},"tags":["Reindex"],"description":"Returns reindex job."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.emporix.io/api-references/api-guides/configuration/indexing-service/api-reference/reindex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
