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

# List the ingested files of a datasource



## OpenAPI

````yaml /deasy-openapi.yml get /v2/datasources/{datasource_id}/files
openapi: 3.1.0
info:
  title: Collibra Unstructured API
  description: >
    REST API for Collibra Unstructured.


    ## Authentication


    Every endpoint accepts either HTTP Basic credentials, or a bearer token sent
    together with the

    `X-User-ID` header identifying the user the call runs as.


    ## Base URL


    Your Unstructured deployment, for example
    `https://unstructured.your-company.com/rest/unstructured`.
  version: 0.1.14
servers:
  - url: /rest/unstructured
security:
  - BasicAuth: []
  - BearerAuth: []
    UserIdAuth: []
tags:
  - name: Core
    description: Endpoints for core functionality
  - name: Data
    description: Endpoints for source data
  - name: Metadata
    description: Endpoints for metadata management
  - name: Tags
    description: Endpoints for tag management
  - name: Taxonomy
    description: Endpoints for taxonomy management
  - name: Dataslice
    description: Endpoints for dataslice management
  - name: Progress Tracker
    description: Endpoints for tracking progress
  - name: Classification
    description: Endpoints for classification
  - name: Ingestion
    description: Endpoints for document ingestion
  - name: Workflows
    description: Endpoints for workflow management
  - name: Deduplication
    description: Endpoints for deduplication
paths:
  /v2/datasources/{datasource_id}/files:
    get:
      tags:
        - Data Connectors
      summary: List the ingested files of a datasource
      operationId: listDatasourceFiles
      parameters:
        - name: datasource_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Datasource Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by file name. Not applied when dataslice_id is set.
            title: Search
          description: Filter by file name. Not applied when dataslice_id is set.
        - name: dataslice_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Only list the files of this dataslice.
            title: Dataslice Id
          description: Only list the files of this dataslice.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            description: Items per page. Max 500.
            default: 100
            title: Limit
          description: Items per page. Max 500.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Token from a previous page's next_cursor.
            title: Cursor
          description: Token from a previous page's next_cursor.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorPage_DatasourceFile_'
        '400':
          description: Invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: No accessible datasource or dataslice with that id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      x-codeSamples:
        - lang: Python
          source: |
            # pip install deasy-sdk
            import os
            from deasy import DeasyClient

            client = DeasyClient(
                base_url=os.environ["UNSTRUCTURED_CLIENT_BASE_URL"],
                username=os.environ["UNSTRUCTURED_USERNAME"],
                password=os.environ["UNSTRUCTURED_PASSWORD"],
            )

            response = client.data_source.list_files(
                "example_datasource_id",
            )
            print(response.results)
components:
  schemas:
    CursorPage_DatasourceFile_:
      properties:
        results:
          items:
            $ref: '#/components/schemas/DatasourceFile'
          type: array
          title: Results
          description: The requested slice of the collection.
        limit:
          type: integer
          title: Limit
          description: Items requested per page.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Opaque token for the next page; absent on the last page.
      type: object
      required:
        - results
        - limit
      title: CursorPage[DatasourceFile]
    StandardErrorResponse:
      properties:
        statusCode:
          type: integer
          title: Statuscode
          description: HTTP status code, repeated in the body.
        errorCode:
          type: string
          title: Errorcode
          description: Stable, specific, camelCase identifier for this condition.
          examples:
            - tagNotFound
        titleMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Titlemessage
          description: Short human-readable summary of the error class.
        userMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Usermessage
          description: Message safe to show to an end user.
        errorContext:
          anyOf:
            - type: string
            - type: 'null'
          title: Errorcontext
          description: W3C traceparent for the request that produced this error.
          examples:
            - 00-0af7651916cd43dd8448eb211c80319c-00f067aa0ba902b7-01
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Machine-readable payload specific to this errorCode. Present only
            for conditions a client can act on programmatically; the set of keys
            is documented per errorCode and only ever widens.
      type: object
      required:
        - statusCode
        - errorCode
      title: StandardErrorResponse
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DatasourceFile:
      properties:
        file_name:
          type: string
          title: File Name
          description: Name of the ingested file.
      type: object
      required:
        - file_name
      title: DatasourceFile
    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:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````

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