create_session
Create a session inside the caller's space, with an id you choose.
create_session(session_id: int, title: str | None = None) -> SessionProvisioncreate_session(request: SessionCreateRequest) -> SessionCreateResponseParameters
session_id64-bit integerrequiredThe id you choose. Deriving it from an id you already have — a thread id, a ticket number — means there is no mapping table to keep in sync.
titlestringoptionalA human label. Optional.
Returns
space_idstringalwaysThe space it was created in.
session_id64-bit integeralwaysThe id you passed.
createdbooleanalwaystrue when this call made it; false when it already existed.
created_at_unix_nanos / last_active_unix_nanos64-bit integeralwaysLifecycle timestamps.
memory_countintegeralwaysHow many memories are already in it.
Creating a session is not required before writing to it.
encode with a session id that does not exist records
the memory against it; create_session exists to give the session a title and
to read its counters back.
You do not choose your space on the HTTP tier
The space comes from the credential. These verbs act on the caller's space. Addressing another space per request is a wire-tier capability — see act_as. Per-end-user isolation is a storage-key prefix inside one space, not a key per user; see Namespaces.
Was this page helpful?