POST
/
v1
/
apps
/
{app_id}
/
users
/
{user_id}
/
collections
/
{collection_id}
/
documents
/
query
import Honcho from 'honcho-ai';

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

async function main() {
  const documents = await client.apps.users.collections.documents.query(
    'app_id',
    'user_id',
    'collection_id',
    { query: 'x' },
  );

  console.log(documents);
}

main();
[
  {
    "id": "<string>",
    "content": "<string>",
    "metadata": {},
    "created_at": "2023-11-07T05:31:56Z",
    "collection_id": "<string>",
    "app_id": "<string>",
    "user_id": "<string>"
  }
]

Authorizations

Authorization
string
header
required

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

Path Parameters

app_id
string
required

ID of the app

user_id
string
required

ID of the user

collection_id
string
required

ID of the collection

Body

application/json

Query parameters for document search

Response

200
application/json

Successful Response

The response is of type object[].