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

# Browse or search a source

> What your account can see, marked with what you've already imported.



## OpenAPI

````yaml get /api/documents/sources/{source}/items
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/documents/sources/{source}/items:
    get:
      tags:
        - Document imports
      summary: Browse or search a source
      description: What your account can see, marked with what you've already imported.
      operationId: browse_api_documents_sources__source__items_get
      parameters:
        - name: source
          in: path
          required: true
          schema:
            enum:
              - notion
              - sharepoint
              - google_drive
              - onedrive
              - confluence
            type: string
            description: The source.
            title: Source
          description: The source.
        - name: parent
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 600
              - type: 'null'
            description: The folder to open; the top level when omitted.
            title: Parent
          description: The folder to open; the top level when omitted.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 4000
              - type: 'null'
            description: '``next_cursor`` from the last page.'
            title: Cursor
          description: '``next_cursor`` from the last page.'
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 200
              - type: 'null'
            description: Search instead of browsing.
            title: Q
          description: Search instead of browsing.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrowseResponse'
        '403':
          description: Needs a personal sign-in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Unknown source, or not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: The source isn't set up, or you need to connect (again).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    BrowseResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SourceItem'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Pass back as ``cursor`` for the next page.
        trail:
          items:
            $ref: '#/components/schemas/TrailEntry'
          type: array
          title: Trail
          description: The breadcrumb to the folder, top first.
      type: object
      required:
        - items
      title: BrowseResponse
      description: One page of a folder, or of search results.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SourceItem:
      properties:
        id:
          type: string
          title: Id
          description: The item's id at the source.
        name:
          type: string
          title: Name
        kind:
          type: string
          enum:
            - folder
            - file
            - page
            - site
            - drive
            - space
            - database
          title: Kind
        has_children:
          type: boolean
          title: Has Children
          description: Whether it can be opened.
        container:
          type: boolean
          title: Container
          description: Choosing it imports everything inside (folders, spaces, databases).
        importable:
          type: boolean
          title: Importable
          description: Whether it can be imported itself.
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Why it can't be imported.
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
          description: Size in bytes, when known.
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
        web_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Web Url
          description: The item at the source.
        path:
          type: string
          title: Path
          description: Where it sits, for search results.
          default: ''
        import_state:
          type: string
          enum:
            - new
            - imported
            - changed
          title: Import State
          description: >-
            ``imported``: you have it and it hasn't changed; ``changed``: it
            changed since you imported it.
          default: new
        document_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Document Id
          description: Your document imported from it, if any.
      type: object
      required:
        - id
        - name
        - kind
        - has_children
        - container
        - importable
      title: SourceItem
      description: One folder, file or page at a source.
    TrailEntry:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: TrailEntry
      description: One step of the breadcrumb.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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