# Bulk re-index the knowledge (model-drift or all).

`POST /api/plugins/docs/knowledge/reindex`

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

Schema: [BulkKnowledgeReindexDTO](https://sourcey-gauzy.pages.dev/api-reference/models/bulkknowledgereindexdto/index.md)

- `scope` (optional)
  Type: string
  
  default: "model-drift"
  
  enum: ["model-drift","all"]

- `dryRun` (optional)
  Type: boolean

Responses:

- 200: Affected-document count (enqueued unless dryRun).

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/plugins/docs/knowledge/reindex' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "scope": "model-drift",
  "dryRun": true
}'
```

### JavaScript

```javascript
const body = `{
  "scope": "model-drift",
  "dryRun": true
}`;

const response = await fetch('http://localhost:3000/api/plugins/docs/knowledge/reindex', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "scope": "model-drift",
  "dryRun": true
}'''

response = requests.post(
    'http://localhost:3000/api/plugins/docs/knowledge/reindex',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
