Get a session
curl --request GET \
--url https://api.zelinqa.ai/v1/sessions/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zelinqa.ai/v1/sessions/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zelinqa.ai/v1/sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "<string>",
"session_id": "<string>",
"client_reference": "<string>",
"status": "active",
"turn_count": 1,
"max_turns": 2,
"turns_remaining": 1,
"question_state": {
"outcomes": [
{
"question_id": "<string>",
"decision_id": "<string>",
"outcome": "asked_answered",
"source": "client",
"message_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
]
},
"targets": {},
"progress": {
"objective": {
"computed_status": "not_started",
"progress": 0.5,
"client_override": {
"status": "achieved",
"updated_at": "2023-11-07T05:31:56Z"
},
"effective_status": "not_started"
},
"sub_objectives": [
{
"id": "<string>",
"order_position": 1,
"completion_role": "blocking",
"computed_status": "not_started",
"progress": 0.5,
"client_override": {
"status": "achieved",
"updated_at": "2023-11-07T05:31:56Z"
},
"effective_status": "not_started"
}
]
},
"pending_decision": {
"decision_id": "<string>",
"candidates": [
{
"rank": 5,
"question_id": "<string>",
"text": "<string>",
"type": "open",
"choices": [
{
"choice_id": "<string>",
"label": "<string>"
}
],
"target_ids": [
"<string>"
]
}
]
},
"degraded": true,
"versions": {
"state_version": 1,
"engine_version": "<string>",
"api_version": "1.0"
}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Sessions
Get a session
Read the current public state, progress, and pending decision of a session.
GET
/
v1
/
sessions
/
{session_id}
Get a session
curl --request GET \
--url https://api.zelinqa.ai/v1/sessions/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zelinqa.ai/v1/sessions/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zelinqa.ai/v1/sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "<string>",
"session_id": "<string>",
"client_reference": "<string>",
"status": "active",
"turn_count": 1,
"max_turns": 2,
"turns_remaining": 1,
"question_state": {
"outcomes": [
{
"question_id": "<string>",
"decision_id": "<string>",
"outcome": "asked_answered",
"source": "client",
"message_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
]
},
"targets": {},
"progress": {
"objective": {
"computed_status": "not_started",
"progress": 0.5,
"client_override": {
"status": "achieved",
"updated_at": "2023-11-07T05:31:56Z"
},
"effective_status": "not_started"
},
"sub_objectives": [
{
"id": "<string>",
"order_position": 1,
"completion_role": "blocking",
"computed_status": "not_started",
"progress": 0.5,
"client_override": {
"status": "achieved",
"updated_at": "2023-11-07T05:31:56Z"
},
"effective_status": "not_started"
}
]
},
"pending_decision": {
"decision_id": "<string>",
"candidates": [
{
"rank": 5,
"question_id": "<string>",
"text": "<string>",
"type": "open",
"choices": [
{
"choice_id": "<string>",
"label": "<string>"
}
],
"target_ids": [
"<string>"
]
}
]
},
"degraded": true,
"versions": {
"state_version": 1,
"engine_version": "<string>",
"api_version": "1.0"
}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Required string length:
1 - 128Response
Successful response.
Available options:
active, completed, stopped Required range:
x >= 0Required range:
x >= 1Required range:
x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes