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

# List Resources



## OpenAPI

````yaml GET /v1/resources
openapi: 3.1.0
info:
  title: re-factor API Reference
  version: 1.0.0
  description: API specification for re-factor system based on schema definitions
servers: []
security:
  - BearerAuth: []
paths:
  /v1/resources:
    get:
      summary: List all resources
      parameters:
        - name: tags
          in: query
          description: Filter resources by tags (comma-separated list)
          required: false
          schema:
            type: string
        - name: directory_prefix
          in: query
          description: Filter resources by directory path prefix
          required: false
          schema:
            type: string
        - name: created_after
          in: query
          description: Filter resources created after this timestamp (ISO 8601)
          required: false
          schema:
            type: string
            format: date-time
        - name: created_before
          in: query
          description: Filter resources created before this timestamp (ISO 8601)
          required: false
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          description: Sort order for created_at field
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: page
          in: query
          description: Page number for pagination
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: page_size
          in: query
          description: Number of items per page
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - total
                  - page
                  - page_size
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Resource'
                  total:
                    type: integer
                    description: Total number of resources matching the filters
                  page:
                    type: integer
                    description: Current page number
                  page_size:
                    type: integer
                    description: Number of items per page
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Resource:
      type: object
      required:
        - id
        - account_id
        - name
        - directory_path
        - mime_type
        - sha256
        - storage_bucket
        - storage_key
        - size_bytes
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the resource
        account_id:
          type: string
          description: ID of the account that owns this resource
        name:
          type: string
          description: Name of the resource
        directory_path:
          type: string
          description: Path to the directory containing the resource
        mime_type:
          type: string
          description: MIME type of the resource
        sha256:
          type: string
          description: SHA256 hash of the resource content
        original_uri:
          type: string
          nullable: true
          description: Original URI of the resource, if applicable
        external_id:
          type: string
          nullable: true
          description: External identifier for the resource, if applicable
        external_storage_type:
          $ref: '#/components/schemas/ExternalStorageType'
          nullable: true
          description: Type of external storage, if applicable
        storage_bucket:
          type: string
          description: Storage bucket where the resource is stored
        storage_key:
          type: string
          description: Key for artifact storage in the storage system
        size_bytes:
          type: integer
          format: int64
          description: Size of the resource in bytes
        tags:
          type: array
          items:
            type: string
          description: >-
            List of tags associated with the resource. While stored in a
            separate table, this field represents the joined data.
        metadata:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional metadata associated with the resource
        created_by:
          type: string
          nullable: true
          description: ID of the user who created the resource
        created_at:
          type: string
          format: date-time
          description: Timestamp when the resource was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the resource was last updated
    ExternalStorageType:
      type: string
      enum:
        - s3
        - gcs
        - azure_blob
      description: Type of external storage provider
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````