curl --request GET \
--url https://api.example.com/v0/corpora/{corpus_id}/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v0/corpora/{corpus_id}/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v0/corpora/{corpus_id}/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v0/corpora/{corpus_id}/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/corpora/{corpus_id}/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v0/corpora/{corpus_id}/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/corpora/{corpus_id}/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"corpus_id": "<string>",
"total": 1,
"catalog_total": 1,
"undated_total": 1,
"catalog_undated_total": 1,
"observed_at": "2023-11-07T05:31:56Z",
"approximate": true,
"complete": true,
"first_catalog_hour": "2023-11-07T05:31:56Z",
"last_catalog_hour": "2023-11-07T05:31:56Z",
"histogram": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"resolution_seconds": 3600,
"items": [
{
"start": "2023-11-07T05:31:56Z",
"count": 1,
"catalog_count": 1
}
],
"next_page_cursor": "<string>"
},
"sources": {
"items": [
{
"namespace": "<string>",
"connector_id": "<string>",
"count": 1,
"catalog_count": 1
}
],
"next_page_cursor": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"trace_id": "<string>",
"span_id": "<string>",
"field": "<string>",
"resync_url": "<string>"
}Get corpus stats
Running eligible-document and catalog totals from transactional aggregates. Eligible documents have a current baseline-ready, non-quarantined Version and no withdrawal or tombstone. Catalog membership includes withdrawn and unready Record identities. Counts are independent of projection generations. All requested fields share one database snapshot at observed_at. complete=false and approximate=true mean historical initialization has not finished; partial zeros are not certified empty. Archived Corpora return 409 corpus_archived. Default reads return totals only. Include histogram and/or sources explicitly. History uses the CURRENT Version’s acceptance time, stored in UTC hours; a correction moves its Record to the new hour. Day resolution groups UTC days. Local days can be reconstructed exactly only for whole-hour UTC offsets. Fractional-hour offsets require finer data and must not be labelled exact. History has no lifetime cutoff: each page covers at most 10000 consecutive buckets, with missing buckets zero only within its covered interval at observed_at when complete=true. Boundary days may be clipped by the requested time range. Consume histogram.next_page_cursor with histogram_cursor and repeat the original parameters. Sources use namespace plus trusted connector identity; historical and public submissions have connector_id unknown. Source counts are lifetime totals regardless of histogram bounds. Consume sources.next_page_cursor with sources_cursor. Each continuation is an independent snapshot; concurrent corrections can change earlier pages, so multiple pages are not one census. Cursors bind Corpus, authorization scope and every query option.
curl --request GET \
--url https://api.example.com/v0/corpora/{corpus_id}/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v0/corpora/{corpus_id}/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v0/corpora/{corpus_id}/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v0/corpora/{corpus_id}/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/corpora/{corpus_id}/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v0/corpora/{corpus_id}/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/corpora/{corpus_id}/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"corpus_id": "<string>",
"total": 1,
"catalog_total": 1,
"undated_total": 1,
"catalog_undated_total": 1,
"observed_at": "2023-11-07T05:31:56Z",
"approximate": true,
"complete": true,
"first_catalog_hour": "2023-11-07T05:31:56Z",
"last_catalog_hour": "2023-11-07T05:31:56Z",
"histogram": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"resolution_seconds": 3600,
"items": [
{
"start": "2023-11-07T05:31:56Z",
"count": 1,
"catalog_count": 1
}
],
"next_page_cursor": "<string>"
},
"sources": {
"items": [
{
"namespace": "<string>",
"connector_id": "<string>",
"count": 1,
"catalog_count": 1
}
],
"next_page_cursor": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"trace_id": "<string>",
"span_id": "<string>",
"field": "<string>",
"resync_url": "<string>"
}Authorizations
API key, not necessarily a JWT. Server derives Organization, permitted actions and Corpus scope; every resource access is authorized.
Path Parameters
1Query Parameters
Comma-separated histogram and/or sources; omit for totals only.
Histogram grouping. Requires include=histogram.
day, hour Inclusive histogram bound, RFC 3339 at a UTC-hour boundary.
Exclusive histogram bound, RFC 3339 at a UTC-hour boundary.
111 <= x <= 1000Response
Totals and any requested series.
x >= 0x >= 0x >= 0x >= 0First occupied catalog UTC hour; not the exact first acceptance time. Absent for an undated or empty corpus.
Last occupied catalog UTC hour; not the exact last acceptance time.
Show child attributes
Show child attributes
Show child attributes
Show child attributes