Skip to main content
GET
Return the stored original of one knowledge source or memory by id: its content inline, a presigned download URL, or both. Use it to show a source behind a query result or to let a user download the original file.

Fetch modes

In content and both modes, the response also includes inferred_content when available: the model-derived text for the source (for memories, the inferred memory statement; for knowledge, derived or normalized content). It is null when the source has no inferred content.

Mode examples

Behavior notes

  • Recently ingested sources: Fetching immediately after ingestion returns the stored original, but inferred_content stays null until indexing produces it. For reliable reads, check Ingestion Status first.
  • Presigned URL TTL: The URL is valid only for expiry_seconds, from 60 to 604800 (7 days), default 3600. Anyone with the URL can download the file during that window, so treat it as a short-lived secret.
  • Memories: Fetching a memory’s id returns its raw text content (a conversation memory returns its stored JSON, with user_name and pairs). Memories are stored like files, so mode=url and mode=both also return a presigned_url.
  • Access control: acl lists the principals to answer as. A source they cannot see returns the same 404 as a missing one. Repeat or comma-separate values, or omit acl for no caller-supplied ACL filtering. For enforced connectors, the authenticated caller is used instead; see ACL enforcement.

Errors

Common codes: 400 INVALID_INPUT (missing id or database, an unknown mode, or expiry_seconds outside 60 to 604800), 404 DATABASE_NOT_FOUND, 404 NOT_FOUND (the source does not exist, or acl is set and its principals may not see it), 500 INTERNAL_ERROR (a transient storage error; retry). See Error Responses for the full list.

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer <your_api_key>.

Query Parameters

id
string
required

The ID of the context to inspect.

Example:

"HydraDoc1234"

database
string
required

Database the context belongs to. Required.

Example:

"acme_corp"

collection
string

Collection the context belongs to. Omit it to use the database's default collection.

Example:

"team_docs"

tenant_id
string
deprecated

Deprecated: use database.

Example:

"tenant_1234"

sub_tenant_id
string
deprecated

Deprecated: use collection.

Example:

"sub_tenant_4567"

expiry_seconds
integer
default:3600

Lifetime of presigned_url in seconds, from 60 to 604800 (7 days). Default 3600.

mode
string

What to return: content (the stored content and enrichment), url (a download URL only) or both. Default both.

Example:

"thinking"

acl
string[]

Principals to answer as. The context must be visible to them, or the response is 404. Repeated (acl=a&acl=b) or comma-separated. Omit it for no access scoping.

Response

OK

data
FetchV2SourceFetchResponse · object
Example:
error
HandlerApiError · object | null

Error details on failure, or null on success.

Example:

null

meta
HandlerResponseMeta · object
Example:
success
boolean

Whether the request succeeded.

Example:

true