retrieval

Upload file for retrieval

Changed on

Uploads a file of up to 100 MiB as multipart form data for managed semantic retrieval. Supported formats are PDF, PNG, JPG/JPEG, GIF, WebP, TXT, Markdown, CSV, JSON, JSONL, YAML, LOG, DOCX, DOC, ODT, RTF, HTML, XLSX, XLS, ODS, PPTX, ODP, EML, and MSG. The file is processed, chunked, and embedded asynchronously; the entry appears in GET /retrieval/entries once indexing finishes.

Required permission: retrieval.manage.

post/v1/projects/{project_id}/retrieval/file

Request

  • Base URL
    https://api.connic.co
  • Auth
    HTTP bearer

Path parameters

project_id, string uuid required

ID of the project the API key belongs to.

Query parameters

environment_id, string uuid required

Environment ID from GET /environments.

namespace, string nullable

Dot-separated namespace such as docs.api, up to 10 levels. Omit for the default namespace.

entry_id, string nullable

Entry identifier. Uploading again with the same ID and namespace replaces the entry. Defaults to the file name.

keep_file, boolean

Keep the file in Files under retrieval/, so search results can link to it. Uploading the entry again with false removes the kept file.

Request body multipart/form-data

RetrievalFileUploadRequest required
file, string binary required

File to index, up to 100 MiB. The file name must end in a supported extension that matches the content; it is also the default entry ID.

metadata, string nullable

JSON object as a string, stored with every chunk of the entry, up to 64 KB. file_size and original_filename are always set from the upload.

Response

Successful Response

PublicRetrievalIngestionResponse required
job_id, string required

ID of the ingestion job that chunks and indexes the content.

status, string required

Job status at submission, pending.

entry_id, string required

Entry the content is stored under. Generated when not supplied.

Changes