Get status for Session
GET /api/v1/session/{sessionId}/status
Description
Get status for a created Triage Session. This could be useful in multiple use cases, such as listing all created Triage Sessions or only show the completed Triage Sessions.
Request Parameters (path)
| Name | Description | Required | Type | Default Value |
|---|---|---|---|---|
sessionId | The identifier of the session | Yes | uuid |
Response
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success, returns a Status |
| 400 | Bad request, invalid input |
| 401 | Unauthorized, missing X-Red-Robin-API-Key header |
| 403 | Forbidden, invalid X-Red-Robin-API-Key header |
| 404 | Not found, invalid configuration |
Status
| Name | Description | Type | Example |
|---|---|---|---|
sessionStatus | An enum describing the status of the session | SessionStatus | Ended |
Enums
SessionStatus
| String value | Description |
|---|---|
Ended | The Triage Session is completed |
StartedChat | The Triage Session has started the chat part of the Triage UI |
Created | The Triage Session is created, but hasn't started the chat part of the Triage UI |
AiSessionNotCreated | The Triage Session wasn't created correctly |
Example Usage
- Javascript
GET /api/v1/session/{sessionId}/status
const headers = new Headers();
headers.append('X-Red-Robin-API-Key', 'API_KEY');
headers.append('Content-Type', 'application/json');
const requestOptions = {
method: 'GET',
headers: headers,
};
fetch('https://se.visibatriage.com/api/v1/session/{sessionId}/status', requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
Example Success Response
{
"sessionStatus": "Ended"
}