client.agentVault().sessions.get() fetches one session. Admins can get every session, and members only their own.
const session = await client.agentVault().sessions.get("<session-id>");
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"label": "nightly deploy",
"actor": {
"type": "machineIdentity",
"id": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
"name": "deploy-bot"
},
"onBehalfOf": null,
"status": "active",
"expiresAt": "2026-12-02T13:00:00.000Z",
"revokedAt": null,
"createdAt": "2026-12-02T12:00:00.000Z",
"accessBundle": {
"id": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
"name": "release"
},
"services": [],
"metadata": { "runId": "8812" }
}
Get a session
Fetch an Agent Vault session with the Node.js SDK.
const session = await client.agentVault().sessions.get("<session-id>");
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"label": "nightly deploy",
"actor": {
"type": "machineIdentity",
"id": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
"name": "deploy-bot"
},
"onBehalfOf": null,
"status": "active",
"expiresAt": "2026-12-02T13:00:00.000Z",
"revokedAt": null,
"createdAt": "2026-12-02T12:00:00.000Z",
"accessBundle": {
"id": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
"name": "release"
},
"services": [],
"metadata": { "runId": "8812" }
}
Was this page helpful?