Skip to main content
Indexing API/Debugging

Document Count

Get the count of documents in a datasource.

Deprecated

The /getdocumentcount endpoint is deprecated (deprecated on 2026-02-03, with removal scheduled for 2026-10-15). Use Datasource Status (/debug/{datasource}/status) instead, which returns richer document counts and status information.

Sample Request

curl -X POST https://customer-be.glean.com/api/index/v1/getdocumentcount
-H 'Authorization : Bearer <token>'
-H 'Content-Type : application/json' \
-d '{
"datasource": "gleantest"
}'

Sample Response

{
"documentCount": 15
}