> ## 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.

# Get files

> Retrieve a list of files uploaded by the user.



## OpenAPI

````yaml get /api/files
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/files:
    get:
      tags:
        - Files
      summary: Get files
      description: Retrieve a list of files uploaded by the user.
      operationId: get_files_api_files_get
      responses:
        '200':
          description: Files retrieved successfully.
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FileModel'
                type: array
                title: Response 200 Get Files Api Files Get
        '400':
          description: Bad request. Invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized. You must authenticate to call this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden. You don't have the required role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    FileModel:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Unique ID for the file.
        owner_id:
          type: string
          title: Owner Id
          description: The logged in user's email ID.
        name:
          type: string
          title: Name
          description: Name of the uploaded file.
        bucket_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket Name
          description: Name of the S3 bucket that stores this file.
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
          description: URL from which the file was originally uploaded.
        s3_url:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Url
          description: S3 URL of the uploaded file.
        size:
          type: integer
          title: Size
          description: Size of the file in bytes.
        access_count:
          type: integer
          title: Access Count
          description: Number of times you accessed the file.
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp of the upload.
        accessed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Accessed At
          description: Timestamp when the file was last accessed.
      type: object
      required:
        - owner_id
        - name
        - size
      title: FileModel
    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
  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

````