Class representing a document loader for loading pages from Confluence.

const loader = new ConfluencePagesLoader({
baseUrl: "https:
spaceKey: "~EXAMPLE362906de5d343d49dcdbae5dEXAMPLE",
username: "your-username",
accessToken: "your-access-token",
});
const documents = await loader.load();
console.log(documents);

Hierarchy (view full)

Constructors

Properties

baseUrl: string
limit: number
maxRetries: number
spaceKey: string
accessToken?: string
expand?: string

expand parameter for confluence rest api description can be found at https://developer.atlassian.com/server/confluence/expansions-in-the-rest-api/

personalAccessToken?: string
username?: string

Methods

  • Fetches all the pages in the specified space and converts each page to a Document instance.

    Parameters

    • Optionaloptions: {
          limit?: number;
          start?: number;
      }

      the extra options of the load function

      • Optionallimit?: number

        The limit parameter to overwrite the size to fetch pages.

      • Optionalstart?: number

        The start parameter to set inital offset to fetch pages.

    Returns Promise<Document[]>

    Promise resolving to an array of Document instances.