GET
/
v2
/
workspaces
/
{workspace_id}
/
sessions
/
{session_id}
/
peers
import Honcho from '@honcho-ai/core';

const client = new Honcho({
  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const peer of client.workspaces.sessions.peers.list('workspace_id', 'session_id')) {
  console.log(peer.id);
}
{
  "items": [
    {
      "id": "<string>",
      "workspace_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "metadata": {},
      "configuration": {}
    }
  ],
  "total": 1,
  "page": 2,
  "size": 2,
  "pages": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
string
required

ID of the workspace

session_id
string
required

ID of the session

Query Parameters

page
integer
default:1

Page number

Required range: x >= 1
size
integer
default:50

Page size

Required range: 1 <= x <= 100

Response

200
application/json

Successful Response

The response is of type object.