Dock
Ingest events
Write a batch of up to 100 events to a knowledge container, a memory space, or both.
/v1/dock/ingestEvery 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[]requiredThe events to write, from 1 to 100.
events[].contentstringrequiredThe text to store, up to 50,000 characters.
events[].typestringrequiredOne of conversation, document, event, preference, entity, or knowledge. Decides where the event goes when you declare both destinations.
events[].metadataobject | nullYour own key and value pairs, up to 10 KB.
events[].end_userstringThe person a memory belongs to. See End users.
events[].dedup_keystring | nullYour own key, up to 256 characters, for deciding when two events are the same.
events[].timestampstring<date-time> | nullWhen the event happened, in ISO 8601. Defaults to the time Docklee receives it.
containerstring | nullvector or okf. The knowledge container to write to. See Containers.
dimensioninteger | nullThe vector dimension, for container: "vector" only. Leave it out to use your workspace default.
memory_space_idstring<uuid> | nullThe memory space to write to.
Declare at least one of container and memory_space_id.
Routing
| You declare | Where events go |
|---|---|
container only | Every event goes to the container. |
memory_space_id only | Every event goes to the memory space. |
| Both | document and knowledge events go to the container. The rest go to the memory space. |
Response
batch_idstring<uuid>requiredThe ID of this batch. Quote it to support.
acceptedintegerrequiredEvents stored.
rejectedintegerrequiredEvents not stored.
errorsobject[]requiredOne entry per rejected event, with its index, an error code, and a message. See Errors.
usageobjectrequiredevents_accepted, ke_events, dum_events, and processing_time_ms for this batch.
Status codes
| Status | Meaning |
|---|---|
200 | Every event was accepted. |
207 | Some events were accepted and some were rejected. |
400 | The memory_space_id isn't a valid UUID. |
401 | The key is missing, malformed, or revoked. |
403 | The key can't write here, such as ke_runtime_denied for a container write without the Knowledge Engines runtime. |
404 | The memory space doesn't exist in the key's workspace. |
413 | The body is too large. |
422 | No destination was declared, a field is invalid, or every event was rejected. |
429 | The write rate limit was hit. |