Package ai.vectros.resources.documents
Class RawDocumentsClient
java.lang.Object
ai.vectros.resources.documents.RawDocumentsClient
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteDocument(String id) Permanently deletes the document and removes it from the search index.deleteDocument(String id, RequestOptions requestOptions) Permanently deletes the document and removes it from the search index.deleteDocument(String id, DeleteDocumentRequest request) Permanently deletes the document and removes it from the search index.deleteDocument(String id, DeleteDocumentRequest request, RequestOptions requestOptions) Permanently deletes the document and removes it from the search index.getDocument(String id) Returns a single document by its ID, including its full structured payload.getDocument(String id, RequestOptions requestOptions) Returns a single document by its ID, including its full structured payload.getDocument(String id, GetDocumentRequest request) Returns a single document by its ID, including its full structured payload.getDocument(String id, GetDocumentRequest request, RequestOptions requestOptions) Returns a single document by its ID, including its full structured payload.Returns a short-lived presigned S3 GET URL for the original uploaded file.getDocumentDownloadUrl(String id, RequestOptions requestOptions) Returns a short-lived presigned S3 GET URL for the original uploaded file.getDocumentDownloadUrl(String id, GetDocumentDownloadUrlRequest request) Returns a short-lived presigned S3 GET URL for the original uploaded file.getDocumentDownloadUrl(String id, GetDocumentDownloadUrlRequest request, RequestOptions requestOptions) Returns a short-lived presigned S3 GET URL for the original uploaded file.Returns the full extracted or ingested text body for documents that were stored withstoreText=true.getDocumentText(String id, RequestOptions requestOptions) Returns the full extracted or ingested text body for documents that were stored withstoreText=true.getDocumentText(String id, GetDocumentTextRequest request) Returns the full extracted or ingested text body for documents that were stored withstoreText=true.getDocumentText(String id, GetDocumentTextRequest request, RequestOptions requestOptions) Returns the full extracted or ingested text body for documents that were stored withstoreText=true.Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document.getDocumentVersions(String id, RequestOptions requestOptions) Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document.getDocumentVersions(String id, GetDocumentVersionsRequest request) Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document.getDocumentVersions(String id, GetDocumentVersionsRequest request, RequestOptions requestOptions) Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document.ingestDocument(IngestDocumentRequest request) Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable.ingestDocument(IngestDocumentRequest request, RequestOptions requestOptions) Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable.Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable.ingestDocument(DocumentRequest body, RequestOptions requestOptions) Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable.Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId).listDocuments(RequestOptions requestOptions) Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId).listDocuments(ListDocumentsRequest request) Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId).listDocuments(ListDocumentsRequest request, RequestOptions requestOptions) Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId).lookupDocuments(LookupDocumentsRequest request) Finds documents of a given type by field value.lookupDocuments(LookupDocumentsRequest request, RequestOptions requestOptions) Finds documents of a given type by field value.Request-body equivalent of GET /v1/documents/lookup.lookupDocumentsByBody(DocumentLookupRequest request, RequestOptions requestOptions) Request-body equivalent of GET /v1/documents/lookup.patchDocument(String id, PatchDocumentRequest request) Partially updates a document using an RFC 7386 JSON Merge Patch.patchDocument(String id, PatchDocumentRequest request, RequestOptions requestOptions) Partially updates a document using an RFC 7386 JSON Merge Patch.updateDocument(String id, UpdateDocumentRequest request) Replaces the mutable fields of a document.updateDocument(String id, UpdateDocumentRequest request, RequestOptions requestOptions) Replaces the mutable fields of a document.uploadDocument(FileUploadRequest request) Starts a file-based document by returning a short-lived presigned S3 PUT URL.uploadDocument(FileUploadRequest request, RequestOptions requestOptions) Starts a file-based document by returning a short-lived presigned S3 PUT URL.
-
Field Details
-
clientOptions
-
-
Constructor Details
-
RawDocumentsClient
-
-
Method Details
-
listDocuments
Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId). The response is a{data, nextCursor}envelope; passnextCursorback asstartFromto fetch the next page. Requires thedocuments:rscope. -
listDocuments
Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId). The response is a{data, nextCursor}envelope; passnextCursorback asstartFromto fetch the next page. Requires thedocuments:rscope. -
listDocuments
Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId). The response is a{data, nextCursor}envelope; passnextCursorback asstartFromto fetch the next page. Requires thedocuments:rscope. -
listDocuments
public VectrosApiHttpResponse<DocumentPage> listDocuments(ListDocumentsRequest request, RequestOptions requestOptions) Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId,orgId, orclientId). The response is a{data, nextCursor}envelope; passnextCursorback asstartFromto fetch the next page. Requires thedocuments:rscope. -
ingestDocument
Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable. Optionally supply anexternalIdto make the create idempotent — if a document with the sameexternalIdalready exists in your context, that existing document is returned unchanged instead of a duplicate being created. The response'screatedfield (and the HTTP status — 201 when created, 200 when an existing document was returned) tells the two apart. To overwrite an existing document's content instead of returning it unchanged, set?upsert=true(this also requires thedocuments:uscope). Requires thedocuments:cscope. -
ingestDocument
public VectrosApiHttpResponse<DocumentResponse> ingestDocument(DocumentRequest body, RequestOptions requestOptions) Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable. Optionally supply anexternalIdto make the create idempotent — if a document with the sameexternalIdalready exists in your context, that existing document is returned unchanged instead of a duplicate being created. The response'screatedfield (and the HTTP status — 201 when created, 200 when an existing document was returned) tells the two apart. To overwrite an existing document's content instead of returning it unchanged, set?upsert=true(this also requires thedocuments:uscope). Requires thedocuments:cscope. -
ingestDocument
Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable. Optionally supply anexternalIdto make the create idempotent — if a document with the sameexternalIdalready exists in your context, that existing document is returned unchanged instead of a duplicate being created. The response'screatedfield (and the HTTP status — 201 when created, 200 when an existing document was returned) tells the two apart. To overwrite an existing document's content instead of returning it unchanged, set?upsert=true(this also requires thedocuments:uscope). Requires thedocuments:cscope. -
ingestDocument
public VectrosApiHttpResponse<DocumentResponse> ingestDocument(IngestDocumentRequest request, RequestOptions requestOptions) Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable. Optionally supply anexternalIdto make the create idempotent — if a document with the sameexternalIdalready exists in your context, that existing document is returned unchanged instead of a duplicate being created. The response'screatedfield (and the HTTP status — 201 when created, 200 when an existing document was returned) tells the two apart. To overwrite an existing document's content instead of returning it unchanged, set?upsert=true(this also requires thedocuments:uscope). Requires thedocuments:cscope. -
getDocument
Returns a single document by its ID, including its full structured payload. Requires thedocuments:rscope. -
getDocument
public VectrosApiHttpResponse<DocumentResponse> getDocument(String id, RequestOptions requestOptions) Returns a single document by its ID, including its full structured payload. Requires thedocuments:rscope. -
getDocument
Returns a single document by its ID, including its full structured payload. Requires thedocuments:rscope. -
getDocument
public VectrosApiHttpResponse<DocumentResponse> getDocument(String id, GetDocumentRequest request, RequestOptions requestOptions) Returns a single document by its ID, including its full structured payload. Requires thedocuments:rscope. -
updateDocument
public VectrosApiHttpResponse<DocumentResponse> updateDocument(String id, UpdateDocumentRequest request) Replaces the mutable fields of a document. This is a full replacement of the payload — to merge fields instead, use PATCH. If you supply newtext, the document body is re-ingested and re-queued for indexing. Requires thedocuments:uscope. -
updateDocument
public VectrosApiHttpResponse<DocumentResponse> updateDocument(String id, UpdateDocumentRequest request, RequestOptions requestOptions) Replaces the mutable fields of a document. This is a full replacement of the payload — to merge fields instead, use PATCH. If you supply newtext, the document body is re-ingested and re-queued for indexing. Requires thedocuments:uscope. -
deleteDocument
Permanently deletes the document and removes it from the search index. This cannot be undone. Requires thedocuments:dscope. -
deleteDocument
Permanently deletes the document and removes it from the search index. This cannot be undone. Requires thedocuments:dscope. -
deleteDocument
Permanently deletes the document and removes it from the search index. This cannot be undone. Requires thedocuments:dscope. -
deleteDocument
public VectrosApiHttpResponse<Void> deleteDocument(String id, DeleteDocumentRequest request, RequestOptions requestOptions) Permanently deletes the document and removes it from the search index. This cannot be undone. Requires thedocuments:dscope. -
patchDocument
public VectrosApiHttpResponse<DocumentResponse> patchDocument(String id, PatchDocumentRequest request) Partially updates a document using an RFC 7386 JSON Merge Patch. Thepayloadobject is deep-merged: keys you send overwrite existing values (recursing into nested objects), a key set tonullis deleted, and keys you omit are preserved — unlike PUT, which replaces the whole payload. Top-level fields (title,storeText,folderId,schemaId, ownership) are set when present and left unchanged when omitted; sending a top-level field asnullis rejected. Supplyingtextre-ingests the document body (same as PUT).indexModeandexternalIdare immutable and rejected if present. The merged result is validated against the bound schema. PassexpectedVersionfor optimistic concurrency (409 on conflict). Requires thedocuments:uscope. -
patchDocument
public VectrosApiHttpResponse<DocumentResponse> patchDocument(String id, PatchDocumentRequest request, RequestOptions requestOptions) Partially updates a document using an RFC 7386 JSON Merge Patch. Thepayloadobject is deep-merged: keys you send overwrite existing values (recursing into nested objects), a key set tonullis deleted, and keys you omit are preserved — unlike PUT, which replaces the whole payload. Top-level fields (title,storeText,folderId,schemaId, ownership) are set when present and left unchanged when omitted; sending a top-level field asnullis rejected. Supplyingtextre-ingests the document body (same as PUT).indexModeandexternalIdare immutable and rejected if present. The merged result is validated against the bound schema. PassexpectedVersionfor optimistic concurrency (409 on conflict). Requires thedocuments:uscope. -
lookupDocuments
Finds documents of a given type by field value. Supported fields:externalId(the document's first-class external identifier — no schema declaration required) and any field declared as a lookup field on the bound schema. A lookup on a sensitive field is rejected here because the value would appear in the URL query string; use POST /v1/documents/lookup (the request-body variant) for a sensitive field instead. Results are paginated: setlimitfor the page size and feed the returnednextCursorback asstartFromto fetch the next page. The response is a{data, nextCursor}envelope. Requires thedocuments:rscope. -
lookupDocuments
public VectrosApiHttpResponse<DocumentLookupPage> lookupDocuments(LookupDocumentsRequest request, RequestOptions requestOptions) Finds documents of a given type by field value. Supported fields:externalId(the document's first-class external identifier — no schema declaration required) and any field declared as a lookup field on the bound schema. A lookup on a sensitive field is rejected here because the value would appear in the URL query string; use POST /v1/documents/lookup (the request-body variant) for a sensitive field instead. Results are paginated: setlimitfor the page size and feed the returnednextCursorback asstartFromto fetch the next page. The response is a{data, nextCursor}envelope. Requires thedocuments:rscope. -
lookupDocumentsByBody
public VectrosApiHttpResponse<DocumentLookupPage> lookupDocumentsByBody(DocumentLookupRequest request) Request-body equivalent of GET /v1/documents/lookup. Use this when looking up by a sensitive field: the value travels in the request body (and is blind-indexed server-side) instead of the URL query string, so it never lands in access, CDN, or proxy logs. The GET variant rejectsvaluefor a sensitive field and directs you here. Requires thedocuments:rscope. -
lookupDocumentsByBody
public VectrosApiHttpResponse<DocumentLookupPage> lookupDocumentsByBody(DocumentLookupRequest request, RequestOptions requestOptions) Request-body equivalent of GET /v1/documents/lookup. Use this when looking up by a sensitive field: the value travels in the request body (and is blind-indexed server-side) instead of the URL query string, so it never lands in access, CDN, or proxy logs. The GET variant rejectsvaluefor a sensitive field and directs you here. Requires thedocuments:rscope. -
getDocumentDownloadUrl
Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires thedocuments:rscope. -
getDocumentDownloadUrl
public VectrosApiHttpResponse<DocumentDownloadResponse> getDocumentDownloadUrl(String id, RequestOptions requestOptions) Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires thedocuments:rscope. -
getDocumentDownloadUrl
public VectrosApiHttpResponse<DocumentDownloadResponse> getDocumentDownloadUrl(String id, GetDocumentDownloadUrlRequest request) Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires thedocuments:rscope. -
getDocumentDownloadUrl
public VectrosApiHttpResponse<DocumentDownloadResponse> getDocumentDownloadUrl(String id, GetDocumentDownloadUrlRequest request, RequestOptions requestOptions) Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires thedocuments:rscope. -
getDocumentText
Returns the full extracted or ingested text body for documents that were stored withstoreText=true. Returns 404 when the document does not exist or when no text is available (becausestoreTextwas false, or extraction has not yet completed). Requires thedocuments:rscope. -
getDocumentText
public VectrosApiHttpResponse<DocumentTextResponse> getDocumentText(String id, RequestOptions requestOptions) Returns the full extracted or ingested text body for documents that were stored withstoreText=true. Returns 404 when the document does not exist or when no text is available (becausestoreTextwas false, or extraction has not yet completed). Requires thedocuments:rscope. -
getDocumentText
public VectrosApiHttpResponse<DocumentTextResponse> getDocumentText(String id, GetDocumentTextRequest request) Returns the full extracted or ingested text body for documents that were stored withstoreText=true. Returns 404 when the document does not exist or when no text is available (becausestoreTextwas false, or extraction has not yet completed). Requires thedocuments:rscope. -
getDocumentText
public VectrosApiHttpResponse<DocumentTextResponse> getDocumentText(String id, GetDocumentTextRequest request, RequestOptions requestOptions) Returns the full extracted or ingested text body for documents that were stored withstoreText=true. Returns 404 when the document does not exist or when no text is available (becausestoreTextwas false, or extraction has not yet completed). Requires thedocuments:rscope. -
getDocumentVersions
Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a{data, nextCursor}envelope. Requires thedocuments:rscope. -
getDocumentVersions
public VectrosApiHttpResponse<ModelDataVersionPage> getDocumentVersions(String id, RequestOptions requestOptions) Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a{data, nextCursor}envelope. Requires thedocuments:rscope. -
getDocumentVersions
public VectrosApiHttpResponse<ModelDataVersionPage> getDocumentVersions(String id, GetDocumentVersionsRequest request) Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a{data, nextCursor}envelope. Requires thedocuments:rscope. -
getDocumentVersions
public VectrosApiHttpResponse<ModelDataVersionPage> getDocumentVersions(String id, GetDocumentVersionsRequest request, RequestOptions requestOptions) Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a{data, nextCursor}envelope. Requires thedocuments:rscope. -
uploadDocument
Starts a file-based document by returning a short-lived presigned S3 PUT URL. Upload the file bytes directly touploadUrl; the document is then automatically queued for text extraction and asynchronous indexing. Supplying anexternalIdmakes this idempotent — re-initiating an upload with the sameexternalIdre-issues a fresh presigned URL to the SAME existing document/object (so a re-upload inherently replaces the file body) rather than creating a duplicate. The response'screatedfield (and the HTTP status — 201 when a new document was minted, 200 when an existing one was matched) tells the two apart. With?upsert=true, the submittedpayload/titleare also applied to the matched document (file-body divergence cannot be diffed at upload-init — the bytes have not arrived yet — so the re-upload itself replaces the body;?upsert=truerequires thedocuments:uscope). Requires thedocuments:cscope. -
uploadDocument
public VectrosApiHttpResponse<FileUploadResponse> uploadDocument(FileUploadRequest request, RequestOptions requestOptions) Starts a file-based document by returning a short-lived presigned S3 PUT URL. Upload the file bytes directly touploadUrl; the document is then automatically queued for text extraction and asynchronous indexing. Supplying anexternalIdmakes this idempotent — re-initiating an upload with the sameexternalIdre-issues a fresh presigned URL to the SAME existing document/object (so a re-upload inherently replaces the file body) rather than creating a duplicate. The response'screatedfield (and the HTTP status — 201 when a new document was minted, 200 when an existing one was matched) tells the two apart. With?upsert=true, the submittedpayload/titleare also applied to the matched document (file-body divergence cannot be diffed at upload-init — the bytes have not arrived yet — so the re-upload itself replaces the body;?upsert=truerequires thedocuments:uscope). Requires thedocuments:cscope.
-