Skip to Content

Dock

Ingest events

Write a batch of up to 100 events to a knowledge container, a memory space, or both.

POST/v1/dock/ingest

Every write goes through this endpoint. Declare a container, a memory_space_id, or both, and each event is routed by what you declare. dock.flush calls it for you.

Body

eventsobject[]required

The events to write, from 1 to 100.

events[].contentstringrequired

The text to store, up to 50,000 characters.

events[].typestringrequired

One of conversation, document, event, preference, entity, or knowledge. Decides where the event goes when you declare both destinations.

events[].metadataobject | null

Your own key and value pairs, up to 10 KB.

events[].end_userstring

The person a memory belongs to. See End users.

events[].dedup_keystring | null

Your own key, up to 256 characters, for deciding when two events are the same.

events[].timestampstring<date-time> | null

When the event happened, in ISO 8601. Defaults to the time Docklee receives it.

containerstring | null

vector or okf. The knowledge container to write to. See Containers.

dimensioninteger | null

The vector dimension, for container: "vector" only. Leave it out to use your workspace default.

memory_space_idstring<uuid> | null

The memory space to write to.

Declare at least one of container and memory_space_id.

Routing

You declareWhere events go
container onlyEvery event goes to the container.
memory_space_id onlyEvery event goes to the memory space.
Bothdocument and knowledge events go to the container. The rest go to the memory space.

Response

batch_idstring<uuid>required

The ID of this batch. Quote it to support.

acceptedintegerrequired

Events stored.

rejectedintegerrequired

Events not stored.

errorsobject[]required

One entry per rejected event, with its index, an error code, and a message. See Errors.

usageobjectrequired

events_accepted, ke_events, dum_events, and processing_time_ms for this batch.

Status codes

StatusMeaning
200Every event was accepted.
207Some events were accepted and some were rejected.
400The memory_space_id isn't a valid UUID.
401The key is missing, malformed, or revoked.
403The key can't write here, such as ke_runtime_denied for a container write without the Knowledge Engines runtime.
404The memory space doesn't exist in the key's workspace.
413The body is too large.
422No destination was declared, a field is invalid, or every event was rejected.
429The write rate limit was hit.