> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Source Pages

> Lists the pages an online document source can see at its provider, grouped by provider workspace. 

The source must be a `connector` source with `metadata.providerKind` of `online-document`.



## OpenAPI

````yaml /en/api-reference/openapi_service.json get /knowledge-fs/spaces/{knowledge_base_id}/sources/{source_id}/pages
openapi: 3.0.1
info:
  description: >-
    REST API for Dify applications and knowledge bases. Application endpoints
    authenticate with an app API key; knowledge endpoints authenticate with a
    dataset API key.
  title: Dify Service API
  version: 1.0.0
servers:
  - description: >-
      Base URL of the Dify Service API. For self-hosted deployments, replace it
      with your own API base URL.
    url: https://{api_base_url}
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: Host and path of the API base URL, without the `https://` prefix.
security:
  - ApiKeyAuth: []
tags:
  - description: Operations related to chat messages and interactions.
    name: Chat Messages
  - description: File upload and preview operations.
    name: Files
  - description: Operations related to end user information.
    name: End Users
  - description: User feedback operations.
    name: Feedback
  - description: Operations related to managing conversations.
    name: Conversations
  - description: Text-to-Speech and Speech-to-Text operations.
    name: Audio
  - description: Operations to retrieve application settings and information.
    name: Applications
  - description: Operations related to managing annotations for direct replies.
    name: Annotations
  - description: Endpoints for resuming paused workflows that require human input.
    name: Human Input
  - description: Operations for executing and managing workflows.
    name: Workflow Runs
  - description: Operations related to text generation and completion.
    name: Completion Messages
  - description: >-
      Operations for managing knowledge bases, including creation,
      configuration, and retrieval.
    name: Knowledge Bases
  - description: >-
      Operations for creating, updating, and managing documents within a
      knowledge base.
    name: Documents
  - description: Operations for managing document chunks and child chunks.
    name: Chunks
  - description: >-
      Operations for managing knowledge base metadata fields and document
      metadata values.
    name: Metadata
  - description: Operations for managing knowledge base tags and tag bindings.
    name: Tags
  - description: Operations for retrieving available models.
    name: Models
  - description: >-
      Operations for managing and running knowledge pipelines, including
      datasource plugins and pipeline execution.
    name: Knowledge Pipeline
  - description: Ask a knowledge base a question and stream the answer.
    name: Queries
  - description: Inspect what a query retrieved and why.
    name: Query Records
  - description: Run a research question in the background and collect its results.
    name: Research Tasks
  - description: >-
      Read the documents in a knowledge base, their files, revisions, and
      chunks; label documents with metadata.
    name: Documents and Chunks
  - description: >-
      Follow, cancel, or retry indexing, and list the knowledge base's
      background tasks.
    name: Indexing Tasks
  - description: >-
      Follow the deletion of a document file, a batch of files, or a source
      until it finishes.
    name: Deletion Jobs
  - description: >-
      Manage the sources that feed a knowledge base, their sync schedules, and
      their connections.
    name: Sources
  - description: >-
      Sync a source now, import website pages or provider items, and follow,
      cancel, or retry the runs.
    name: Source Syncs and Imports
  - description: >-
      Read and change the knowledge base's models and retrieval settings, and
      follow the migration a change starts.
    name: Settings
paths:
  /knowledge-fs/spaces/{knowledge_base_id}/sources/{source_id}/pages:
    get:
      tags:
        - Sources
      summary: List Source Pages
      description: >-
        Lists the pages an online document source can see at its provider,
        grouped by provider workspace. 


        The source must be a `connector` source with `metadata.providerKind` of
        `online-document`.
      operationId: listSourcePages
      parameters:
        - description: >-
            Knowledge base ID: the last segment of the Service API endpoint
            shown in the knowledge base's **API Access** dialog
            (`…/knowledge-fs/spaces/<knowledge base ID>`), and the segment after
            `/datasets/new/` in the address bar.
          in: path
          name: knowledge_base_id
          required: true
          schema:
            format: uuid
            type: string
        - description: >-
            Source ID. From [List
            Sources](/en/api-reference/sources/list-sources).
          in: path
          name: source_id
          required: true
          schema:
            format: uuid
            type: string
        - description: >-
            The `next_cursor` from the previous response. Treat it as an opaque
            string. In tree view, send it with the same `view`, `parentId`, and
            `limit`.
          in: query
          name: cursor
          required: false
          schema:
            maxLength: 4096
            minLength: 1
            type: string
        - description: Pages per response.
          in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 200
            minimum: 1
            type: integer
        - description: >-
            Send `tree` to list one level of the page tree: the top level, or
            the pages under `parentId`. Leave it out for the flat list.


            Among the official data source plugins, only GitHub supports tree
            view, from plugin version 0.4.12.


            On GitHub, use tree view to reach a repository's files. Both views
            cover at most the 20 most recently updated repositories. Under them,
            the two views reach different pages:


            - **Tree view**: under each repository, its Contents, Issues (when
            the repository has issues turned on), and Pull requests. Contents
            and its folders hold folders and importable text files.

            - **Flat list**: each repository, its README if it has one, and up
            to five issues and five pull requests.
          in: query
          name: view
          required: false
          schema:
            enum:
              - tree
            type: string
        - description: >-
            The `page_id` of the page to expand, from an earlier tree-view
            response in which its `has_children` is `true`. Requires
            `view=tree`.


            Spell it in camelCase as shown, even though the matching response
            field is `parent_id`.
          in: query
          name: parentId
          required: false
          schema:
            maxLength: 4096
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                success:
                  summary: Response Example - Flat list
                  value:
                    next_cursor: null
                    workspaces:
                      - pages:
                          - has_children: null
                            last_edited_time: '2026-09-01T12:00:00.000Z'
                            page_id: 3f9a1c2b-7d4e-4f5a-8b6c-9d0e1f2a3b4c
                            page_name: Onboarding
                            parent_id: null
                            type: page
                          - has_children: null
                            last_edited_time: '2026-08-20T09:30:00.000Z'
                            page_id: 5c1b2d3e-8f4a-4b6c-9d7e-0f1a2b3c4d5e
                            page_name: Runbooks
                            parent_id: 3f9a1c2b-7d4e-4f5a-8b6c-9d0e1f2a3b4c
                            type: database
                        total: 2
                        workspace_id: ws_01HZYQ8K3M
                        workspace_name: Acme Wiki
                tree:
                  summary: >-
                    Response Example - Tree view
                    (parentId=contents:acme/handbook, limit=2)
                  value:
                    next_cursor: '2'
                    workspaces:
                      - pages:
                          - has_children: false
                            last_edited_time: '2026-11-02T08:14:31Z'
                            page_id: file:acme/handbook:README.md
                            page_name: README.md
                            parent_id: contents:acme/handbook
                            type: file
                          - has_children: true
                            last_edited_time: '2026-11-02T08:14:31Z'
                            page_id: dir:acme/handbook:guides
                            page_name: guides
                            parent_id: contents:acme/handbook
                            type: github_directory
                        total: 9
                        workspace_id: '58213907'
                        workspace_name: Acme's GitHub
              schema:
                properties:
                  next_cursor:
                    description: >-
                      Cursor for the next page, or `null` on the last page. Send
                      it back as `cursor`.
                    nullable: true
                    type: string
                  workspaces:
                    description: Provider workspaces the credentials can see.
                    items:
                      properties:
                        pages:
                          description: Pages on this response page.
                          items:
                            properties:
                              has_children:
                                description: >-
                                  Whether the page can be expanded in tree view:
                                  pass its `page_id` as `parentId`. A `true`
                                  page can still come back empty, such as the
                                  Issues of a repository with no issues. `null`
                                  when the provider doesn't report it.
                                nullable: true
                                type: boolean
                              last_edited_time:
                                description: >-
                                  Last edit time in the provider's format. Treat
                                  it as an opaque string.
                                nullable: true
                                type: string
                              page_id:
                                description: Provider page ID.
                                type: string
                              page_name:
                                description: Page title.
                                type: string
                              parent_id:
                                description: >-
                                  Provider ID of the parent page. `null` at the
                                  top level.
                                nullable: true
                                type: string
                              type:
                                description: >-
                                  Provider-defined page kind, for example `page`
                                  or `database`.
                                type: string
                            type: object
                          type: array
                        total:
                          description: >-
                            Pages in the workspace, or `null` when the provider
                            doesn't report a count. In tree view, GitHub counts
                            the requested level, except under Issues and Pull
                            requests, where it counts only the pages in this
                            response. To tell whether more pages remain, check
                            `next_cursor`.
                          nullable: true
                          type: integer
                        workspace_id:
                          description: >-
                            Provider workspace ID. `null` when the provider has
                            no workspace concept.
                          nullable: true
                          type: string
                        workspace_name:
                          description: Provider workspace name.
                          nullable: true
                          type: string
                      type: object
                    type: array
                type: object
          description: Pages grouped by workspace.
        '400':
          content:
            application/json:
              examples:
                knowledge_fs_invalid_request:
                  summary: knowledge_fs_invalid_request (validation)
                  value:
                    code: knowledge_fs_invalid_request
                    message: Agent Knowledge Base request is invalid.
                    status: 400
                    violations:
                      - field:
                          - limit
                        type: less_than_equal
                knowledge_fs_invalid_request_parent:
                  summary: knowledge_fs_invalid_request (parentId without view)
                  value:
                    code: knowledge_fs_invalid_request
                    failure:
                      category: validation
                      code: KNOWLEDGE_FS_INVALID_REQUEST
                      message: The Agent Knowledge Base request is invalid.
                      retryPolicy: never
                      traceId: 8d41f6b2-0c3e-4a7f-9b52-6e1d3a9c7f04
                    message: The Agent Knowledge Base request is invalid.
                    status: 400
                knowledge_fs_invalid_request_path:
                  summary: knowledge_fs_invalid_request (path ID)
                  value:
                    code: knowledge_fs_invalid_request
                    message: Agent Knowledge Base request is invalid.
                    status: 400
                knowledge_fs_invalid_request_type:
                  summary: knowledge_fs_invalid_request (source type)
                  value:
                    code: knowledge_fs_invalid_request
                    failure:
                      category: validation
                      code: KNOWLEDGE_FS_INVALID_REQUEST
                      message: The Agent Knowledge Base request is invalid.
                      retryPolicy: never
                    message: The Agent Knowledge Base request is invalid.
                    status: 400
          description: >-
            - `knowledge_fs_invalid_request`: a query parameter value is outside
            its constraints, or the query string carries an unknown parameter,
            such as `parent_id`. `violations` names each failing field.

            - `knowledge_fs_invalid_request`: `parentId` is sent without
            `view=tree`. The body carries `failure` instead of `violations`.

            - `knowledge_fs_invalid_request`: the source is not a `connector`
            source.

            - `knowledge_fs_invalid_request`: `source_id` is not a UUID.

            - `knowledge_fs_invalid_request`: `source_id` is malformed.
        '401':
          content:
            application/json:
              examples:
                knowledge_fs_invalid_credential:
                  summary: knowledge_fs_invalid_credential
                  value:
                    code: knowledge_fs_invalid_credential
                    message: Invalid Agent Knowledge Base service credential.
                    status: 401
                unauthorized:
                  summary: unauthorized
                  value:
                    code: unauthorized
                    message: Access token is invalid
                    status: 401
          description: >-
            - `unauthorized`: the `Authorization` header is missing, or the key
            is unknown or not a knowledge base API key.

            - `knowledge_fs_invalid_credential`: the key is valid, but no
            knowledge base with this ID exists in the key's workspace, or the
            key is not tied to a workspace.
        '403':
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden (rate limit)
                  value:
                    code: forbidden
                    message: >-
                      Sorry, you have reached the knowledge base request rate
                      limit of your subscription.
                    status: 403
                knowledge_fs_access_denied:
                  summary: knowledge_fs_access_denied (key scope)
                  value:
                    code: knowledge_fs_access_denied
                    message: Agent Knowledge Base operation is not allowed.
                    status: 403
          description: >-
            - `knowledge_fs_access_denied`: the key is scoped to other knowledge
            bases, **API access** is off for this knowledge base, or the
            knowledge base is not active.

            - `forbidden`: on Dify Cloud, the workspace has reached the
            knowledge base request rate limit of its subscription. Every call
            counts, reads included.
        '404':
          content:
            application/json:
              examples:
                knowledge_fs_resource_not_found:
                  summary: knowledge_fs_resource_not_found
                  value:
                    code: knowledge_fs_resource_not_found
                    failure:
                      category: not_found
                      code: KNOWLEDGE_FS_NOT_FOUND
                      message: >-
                        The requested Agent Knowledge Base resource was not
                        found.
                      retryPolicy: never
                    message: The requested Agent Knowledge Base resource was not found.
                    status: 404
                not_found:
                  summary: not_found (feature off)
                  value:
                    code: not_found
                    message: >-
                      The requested URL was not found on the server. If you
                      entered the URL manually please check your spelling and
                      try again.
                    status: 404
          description: >-
            - `knowledge_fs_resource_not_found`: no source with this ID exists
            in the knowledge base, or its `permission_scope` is outside the
            key's grants.

            - `not_found`: the Agent Knowledge Base feature is turned off on
            this deployment.
        '502':
          content:
            application/json:
              examples:
                knowledge_fs_upstream_unavailable:
                  summary: knowledge_fs_upstream_unavailable
                  value:
                    code: knowledge_fs_upstream_unavailable
                    message: Agent Knowledge Base is unavailable.
                    status: 502
                knowledge_fs_upstream_unavailable_provider:
                  summary: >-
                    knowledge_fs_upstream_unavailable
                    (SOURCE_ONLINE_DOCUMENT_REQUEST_FAILED)
                  value:
                    code: knowledge_fs_upstream_unavailable
                    failure:
                      action: retry
                      category: dependency
                      code: SOURCE_ONLINE_DOCUMENT_REQUEST_FAILED
                      message: >-
                        A service required by Agent Knowledge Base is
                        temporarily unavailable.
                      retryPolicy: manual
                      traceId: 5e2a9c17-3b4d-4f60-8a1b-2c3d4e5f6a7b
                    message: >-
                      A service required by Agent Knowledge Base is temporarily
                      unavailable.
                    status: 502
          description: >-
            - `knowledge_fs_upstream_unavailable`: no answer came back in time,
            or the answer couldn't be read. Retry after a pause.

            - `knowledge_fs_upstream_unavailable`: the provider or the
            connection failed. The body carries `failure`, for example with
            `SOURCE_ONLINE_DOCUMENT_REQUEST_FAILED`.

            - `knowledge_fs_upstream_unavailable`: the deployment has no online
            document connector configured. `failure.code` is
            `KNOWLEDGE_FS_INTERNAL_ERROR`.
        '503':
          content:
            application/json:
              examples:
                knowledge_fs_operation_unavailable:
                  summary: knowledge_fs_operation_unavailable
                  value:
                    code: knowledge_fs_operation_unavailable
                    message: Agent Knowledge Base operation is not available.
                    status: 503
                knowledge_fs_operation_unavailable_upstream:
                  summary: knowledge_fs_operation_unavailable (temporary)
                  value:
                    code: knowledge_fs_operation_unavailable
                    failure:
                      action: retry
                      category: dependency
                      code: KNOWLEDGE_FS_UNAVAILABLE
                      message: >-
                        A service required by Agent Knowledge Base is
                        temporarily unavailable.
                      retryPolicy: manual
                      traceId: 5e2a9c17-3b4d-4f60-8a1b-2c3d4e5f6a7b
                    message: >-
                      A service required by Agent Knowledge Base is temporarily
                      unavailable.
                    status: 503
          description: >-
            - `knowledge_fs_operation_unavailable`: the Agent Knowledge Base
            feature is not set up for this workspace, this operation is not
            available on the deployment, or the key's access to this knowledge
            base changed while the request was being authorized.

            - `knowledge_fs_operation_unavailable`: the request can't be served
            right now. Follow `failure.retryPolicy`.
components:
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: API_KEY
      description: >-
        Every request authenticates with an API key: `Authorization: Bearer
        {API_KEY}`. App endpoints take an app API key; knowledge endpoints take
        a knowledge base API key ([Get
        Started](/en/api-reference/guides/get-started)).


        Keep keys server-side; never embed them in client code. Requests with a
        missing or invalid key fail with HTTP `401` (`unauthorized`).
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.