Get a session with its messages
curl --request GET \
--url https://albus.sh/api/sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://albus.sh/api/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://albus.sh/api/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"session": {
"id": "<string>",
"state": "RUNNING",
"invocation_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"current_invocation_key": "<string>",
"agent_name": "<string>",
"agent_revision": "<string>"
},
"messages": [
{
"cursor": 123,
"invocation_key": "<string>",
"role": "user",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "Invalid request parameters"
}{
"message": "Invalid or expired token"
}{
"message": "Resource not found"
}Sessions
Get a session with its messages
Returns the session’s metadata and a page of its messages ordered by cursor ascending. Use after and limit to page through messages.
GET
/
sessions
/
{id}
Get a session with its messages
curl --request GET \
--url https://albus.sh/api/sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://albus.sh/api/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://albus.sh/api/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"session": {
"id": "<string>",
"state": "RUNNING",
"invocation_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"current_invocation_key": "<string>",
"agent_name": "<string>",
"agent_revision": "<string>"
},
"messages": [
{
"cursor": 123,
"invocation_key": "<string>",
"role": "user",
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "Invalid request parameters"
}{
"message": "Invalid or expired token"
}{
"message": "Resource not found"
}Authorizations
bearerAuthapiKey
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Client-provided session identifier. Use the same value across requests to continue the same agent session.
Required string length:
2 - 100Pattern:
^[0-9a-zA-Z._:-]+$Query Parameters
Opaque pagination cursor. Return only items positioned after it; pass a value obtained from a previous page to fetch the next one.
Maximum number of items to return.
Required range:
1 <= x <= 1000