---
title: "Schedules the processing of uploaded documents"
method: POST
path: "/api/index/v1/processalldocuments"
tags: ["Documents"]
---

# Schedules the processing of uploaded documents

`POST /api/index/v1/processalldocuments`

Schedules the immediate processing of documents uploaded through the indexing API. By default the uploaded documents will be processed asynchronously but this API can be used to schedule processing of all documents on demand.

If a `datasource` parameter is specified, processing is limited to that custom datasource. Without it, processing applies to all documents across all custom datasources.
#### Rate Limits
This endpoint is rate-limited to one usage every 3 hours. Exceeding this limit results in a 429 response code. Here's how the rate limit works:
1. Calling `/processalldocuments` for datasource `foo` prevents another call for `foo` for 3 hours.
2. Calling `/processalldocuments` for datasource `foo` doesn't affect immediate calls for `bar`.
3. Calling `/processalldocuments` for all datasources prevents any datasource calls for 3 hours.
4. Calling `/processalldocuments` for datasource `foo` doesn't affect immediate calls for all datasources.

For more frequent document processing, contact Glean support.

## Request body

- ProcessAllDocumentsRequest — Describes the request body of the /processalldocuments API call
  - `datasource` string — If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed.

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Not Authorized
- `429` — Too Many Requests

---

[API](https://skmtc.net/gleanwork/apis/glean-api-2.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-api-2/versions/c4ae998a3802/schema)
