A thread, its messages, and the agents still answering
const url = 'http://localhost:11044/api/v1/threads/example';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:11044/api/v1/threads/example \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The thread’s id (a UUIDv7), as returned when it was created or listed by GET /api/v1/threads. Only the caller’s own threads are found; any other id is 404
Responses
Section titled “Responses”The thread
A thread with all its messages and the agents still answering; answered by GET /threads/{id}
object
Every message in the thread, oldest first
One message in a thread, with what it attached. POST /threads/{id}/messages answers the one posted; GET /threads/{id} lists them all, oldest first.
object
Things attached to the message, frozen when it was sent; at most 10
A typed thing from the world attached to a thread message — a record, a view’s rows, or a request — frozen when the message was sent, so the receiver gets the thing rather than a paragraph about it
object
For a view, the arguments it ran with; empty otherwise
object
When the attachment was resolved and frozen, as an ISO-8601 instant; null on one an agent attached without a time
The entity’s key or id, or the request’s id; null for a view
ENTITY for a record, VIEW for a view’s rows, REQUEST for a request awaiting or past a person’s decision
The entity’s label, the view’s name, or request for a request
For an entity, the record’s properties as the sender saw it; for a request, its verb, status (lowercase), routine and args; empty for a view
object
For a view, its rows as run when the message was sent, at most 25; empty otherwise
object
Card title for a person to read; defaults to the label and id for an entity, the view’s name for a view, and the request’s detail for a request
When the message was written, as an ISO-8601 instant
Who wrote it
object
PERSON for the thread’s owner, AGENT for an agent, APPLIANCE for the appliance’s own notices
The person’s username, the agent’s name, or appliance
Message id, a UUIDv7 string, so ids sort in the order the messages were written
Id of the message this one answers; null on a message that answers none, such as a person’s post
Names of the agents this message @mentioned, limited to agents that exist in the world; empty when it addressed none by name
The words of the message; may be empty on a person’s message that only attaches things, and is “(no answer)” when an agent replied with nothing
Id of the thread the message is in
True on an agent’s answer to a message that carried no attachment, so it was given from the words alone
The thread’s own record: its id, owner, title and timestamps, without its messages
object
When the thread was started, as an ISO-8601 instant
Thread id, a UUIDv7 string; the {id} in /threads/{id}
User id of the person who owns the thread; always the caller, since only the owner can read it
Title as given when the thread was started, trimmed; “Untitled” when none was given
Last activity in the thread, as an ISO-8601 instant; the list is sorted on it, newest first
Names of the agents still working on an answer, sorted; empty when none is. Not kept across a restart, so an answer in progress then is no longer shown as awaited.
Example
{ "messages": [ { "attachments": [ { "kind": "ENTITY" } ], "from": { "kind": "PERSON" } } ]}No authenticated principal
A refusal with a machine-readable code and a plain-language message. ApiErrorAdvice answers it for a failed validation, a missing resource or a conflicting state, and some controllers answer it directly
object
Machine-readable key to branch on, such as validation_failed, unknown_field, not_found or conflict. Open: a surface may answer codes of its own
Extra context where there is some, such as the fields a body may carry; null otherwise
A plain-language explanation, written to be shown. Never carries an exception message
The body the servlet error dispatch answers for a status raised by an exception rather than written by the endpoint. Every failure except 404, which answers the not-found HTML page
object
The status’s standard reason phrase, such as Bad Request or Forbidden
The request path that failed
The HTTP status code, repeated from the status line
Example generated
{ "code": "example", "detail": "example", "message": "example"}No thread of yours with that id

