Push documents to a push source
POST/api/v1/sources/:id/documents
Accepts one or more documents for a push-provider source (see POST /sources with provider_type=push) and enqueues each for ingest through the same index/claim/extract path a pulled document takes. Returns 202 Accepted: the document rows exist and their raw bytes are retained, but nothing has been normalised, indexed or extracted yet. Poll GET /api/v1/documents/{id} and read ingest_status ("processing" / "indexed" / "failed") to find out when a document became searchable. Re-pushing the same external_id is idempotent and returns the same document_id. Admin only - see the RequireAdmin wiring at setupRoutes for why a pushing service's m2m token must resolve to a users row with Role=admin. Bytes travel base64-encoded in JSON; see the doc comment body below for why that was chosen over multipart/form-data. Body limited to pushDocumentMaxBodyBytes (larger than the default 10 MiB, since base64 inflates size by roughly a third).
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 413
- 500
- 503
Accepted
Invalid request, unsupported mode, non-push source, or missing push root container
Unauthorized
Forbidden - admin only
Source not found
Request body too large
Internal server error
Task queue not configured, or document retention disabled