POST
/
v2
/
workspaces
/
list
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 workspace of client.workspaces.list()) {
  console.log(workspace.id);
}
{
  "items": [
    {
      "id": "<string>",
      "metadata": {},
      "configuration": {},
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "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.

Query Parameters

page
integer
default:1

Page number

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

Page size

Required range: 1 <= x <= 100

Body

application/json

Filtering and pagination options for the workspaces list

Response

200
application/json

Successful Response

The response is of type object.