Skip to main content
GET
https://api.usedari.com
/
public
/
sessions
/
{session_id}
from dari import Dari

client = Dari(api_key="YOUR_API_KEY")

session = client.get_session("sess_a1b2c3d4e5f6")

print(f"Session status: {session['status']}")
print(f"Expires at: {session['expires_at']}")
{
  "session_id": "sess_a1b2c3d4e5f6",
  "cdp_url": "ws://browser-proxy.usedari.com/devtools/browser/a1b2c3d4",
  "screen_config": {
    "width": 1920,
    "height": 1080
  },
  "status": "active",
  "expires_at": "2024-11-26T10:34:00Z",
  "metadata": {
    "purpose": "workflow-automation"
  },
  "created_at": "2024-11-26T09:34:00Z",
  "updated_at": "2024-11-26T09:34:00Z"
}
Retrieve detailed information about a specific browser session by its ID.

Headers

X-API-Key
string
required
Your API key for authentication

Path Parameters

session_id
string
required
The unique identifier of the session to retrieve

Response Fields

session_id
string
Unique identifier for the session
cdp_url
string
Chrome DevTools Protocol WebSocket URL (if managed)
screen_config
object
Screen dimensions configuration
status
string
Session status: active, terminated, or expired
expires_at
string
ISO 8601 timestamp when the session will expire
metadata
object
Custom metadata attached to the session
created_at
string
ISO 8601 timestamp when the session was created
updated_at
string
ISO 8601 timestamp when the session was last updated
from dari import Dari

client = Dari(api_key="YOUR_API_KEY")

session = client.get_session("sess_a1b2c3d4e5f6")

print(f"Session status: {session['status']}")
print(f"Expires at: {session['expires_at']}")
{
  "session_id": "sess_a1b2c3d4e5f6",
  "cdp_url": "ws://browser-proxy.usedari.com/devtools/browser/a1b2c3d4",
  "screen_config": {
    "width": 1920,
    "height": 1080
  },
  "status": "active",
  "expires_at": "2024-11-26T10:34:00Z",
  "metadata": {
    "purpose": "workflow-automation"
  },
  "created_at": "2024-11-26T09:34:00Z",
  "updated_at": "2024-11-26T09:34:00Z"
}

Error Responses

{
  "detail": "Invalid API key"
}
{
  "detail": "Session not found"
}