Endpoint: GET /v1/sessions/{session_id}
This endpoint retrieves details of a specific session based on the provided session_id
.
Query String Parameters
Optional timeout for the request.
Parameters
The unique ID of the session to retrieve.
curl -X GET "https://agent.api.lyzr.app/v1/sessions/{session_id}?timeout=30" \
-H "accept: application/json"\
-H "x-api-key: your_api_key_here"
import requests
session_id = "123"
url = f"https://agent.api.lyzr.app/v1/sessions/{session_id}?timeout=30"
headers = {
"Content-Type": "application/json",
"x-api-key": "your_api_key_here"
}
response = requests.get(url, headers=headers)
{
"active": false,
"session_id": "IITZ",
"_id": "66dac329a64b2c361cb39286",
"user_id": "123",
"created_at": "2024-09-06T08:54:01.978000"
}
Response Parameters
Indicates if the session is currently active.
The unique identifier of the session.
The internal ID of the session in the database.
The ID of the user associated with the session.
The timestamp when the session was created.