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

# List Objects in Bucket



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/storage.yaml get /api/storage/buckets/{bucketName}/objects
openapi: 3.0.3
info:
  title: Insforge Storage API
  version: 2.0.0
  description: Bucket-based storage system similar to S3
servers: []
security: []
paths:
  /api/storage/buckets/{bucketName}/objects:
    get:
      tags:
        - Admin
      summary: List Objects in Bucket
      parameters:
        - name: bucketName
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9_-]+$
          example: avatars
        - name: prefix
          in: query
          required: false
          schema:
            type: string
          description: Filter objects by key prefix
          example: users/
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: search
          in: query
          required: false
          schema:
            type: string
          description: Search objects by key (partial match)
          example: profile
      responses:
        '200':
          description: List of objects in bucket
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/StoredFile'
                  pagination:
                    type: object
                    properties:
                      offset:
                        type: integer
                        example: 0
                      limit:
                        type: integer
                        example: 100
                      total:
                        type: integer
                        example: 2
                  nextActions:
                    type: string
                    example: >-
                      You can use PUT
                      /api/storage/buckets/:bucketName/objects/:objectKey to
                      upload with a specific key, or POST
                      /api/storage/buckets/:bucketName/objects to upload with
                      auto-generated key, and GET
                      /api/storage/buckets/:bucketName/objects/:objectKey to
                      download an object.
              example:
                data:
                  - bucket: avatars
                    key: users/user123.jpg
                    size: 102400
                    mimeType: image/jpeg
                    uploadedAt: '2024-01-15T10:30:00Z'
                    url: /api/storage/buckets/avatars/objects/users/user123.jpg
                  - bucket: avatars
                    key: users/user456.png
                    size: 204800
                    mimeType: image/png
                    uploadedAt: '2024-01-16T11:00:00Z'
                    url: /api/storage/buckets/avatars/objects/users/user456.png
                pagination:
                  offset: 0
                  limit: 100
                  total: 2
                nextActions: >-
                  You can use PUT
                  /api/storage/buckets/:bucketName/objects/:objectKey to upload
                  with a specific key, or POST
                  /api/storage/buckets/:bucketName/objects to upload with
                  auto-generated key, and GET
                  /api/storage/buckets/:bucketName/objects/:objectKey to
                  download an object.
      security:
        - apiKey: []
components:
  schemas:
    StoredFile:
      type: object
      properties:
        bucket:
          type: string
          example: avatars
          description: Name of the bucket containing the object
        key:
          type: string
          example: user123.jpg
          description: Unique key identifying the object within the bucket
        size:
          type: integer
          example: 102400
          description: Size of the file in bytes
        mimeType:
          type: string
          example: image/jpeg
          description: MIME type of the file
        uploadedAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: ISO timestamp when the file was uploaded
        url:
          type: string
          example: /api/storage/buckets/avatars/objects/user123.jpg
          description: URL to download the file
      required:
        - bucket
        - key
        - size
        - uploadedAt
        - url
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````