Skip to main content
GET
/
v1beta
/
namespaces
/
{namespace}
/
documents
JavaScript
import Jetti from 'jetti';

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

const documents = await client.beta.namespaces.documents.list('namespace');

console.log(documents.results);
{
  "results": [
    {
      "id": "doc_123_0",
      "root_document_id": "doc_123",
      "page_number": 0,
      "created_at": "2024-01-15T10:30:00Z",
      "document_title": "Annual Report 2024",
      "file_name": "annual_report_2024.pdf",
      "content": "UNITED STATES SECURITIES AND EXCHANGE COMMISSION..."
    },
    {
      "id": "doc_123_1",
      "root_document_id": "doc_123",
      "page_number": 1,
      "created_at": "2024-01-15T10:30:00Z",
      "document_title": "Annual Report 2024",
      "file_name": "annual_report_2024.pdf",
      "content": "For the fiscal year ended December 31, 2024..."
    }
  ]
}

Path Parameters

namespace
string
required

ID of the namespace to list documents from.

Response

List of documents.

Response containing a list of documents.

results
Document · object[]
required

List of documents in the namespace.