List Environment Connections
environments.list(EnvironmentListParams**kwargs) -> EnvironmentListResponse
/v1/environments
List all active environment connections for the organization
Parameters
after: Optional[str]
limit: Optional[str]
online_only: Optional[str]
user_id: Optional[str]
Returns
List Environment Connections
import os
from letta_client import Letta
client = Letta(
api_key=os.environ.get("LETTA_API_KEY"), # This is the default and can be omitted
)
environments = client.environments.list()
print(environments.connections)
{
"connections": [
{
"id": "id",
"connectedAt": 0,
"connectionId": "connectionId",
"connectionName": "connectionName",
"deviceId": "deviceId",
"firstSeenAt": 0,
"lastHeartbeat": 0,
"lastSeenAt": 0,
"organizationId": "organizationId",
"podId": "podId",
"apiKeyOwner": "apiKeyOwner",
"currentMode": "default",
"metadata": {
"gitBranch": "gitBranch",
"lettaCodeVersion": "lettaCodeVersion",
"nodeVersion": "nodeVersion",
"os": "os",
"self_update": {
"supported": true,
"writable": true,
"install_path": "install_path",
"manual_command": "manual_command",
"reason": "reason"
},
"supported_commands": [
"string"
],
"workingDirectory": "workingDirectory"
},
"userId": "userId"
}
],
"hasNextPage": true
}
Returns Examples
{
"connections": [
{
"id": "id",
"connectedAt": 0,
"connectionId": "connectionId",
"connectionName": "connectionName",
"deviceId": "deviceId",
"firstSeenAt": 0,
"lastHeartbeat": 0,
"lastSeenAt": 0,
"organizationId": "organizationId",
"podId": "podId",
"apiKeyOwner": "apiKeyOwner",
"currentMode": "default",
"metadata": {
"gitBranch": "gitBranch",
"lettaCodeVersion": "lettaCodeVersion",
"nodeVersion": "nodeVersion",
"os": "os",
"self_update": {
"supported": true,
"writable": true,
"install_path": "install_path",
"manual_command": "manual_command",
"reason": "reason"
},
"supported_commands": [
"string"
],
"workingDirectory": "workingDirectory"
},
"userId": "userId"
}
],
"hasNextPage": true
}