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

> Returns deployment runs ordered by creation time descending. Pagination metadata is returned in `Content-Range` headers.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/deployments.yaml get /api/deployments
openapi: 3.0.3
info:
  title: Insforge Deployments API
  version: 1.0.0
  description: >-
    Frontend deployment sessions, source uploads, environment variables, and
    custom domains.
servers: []
security: []
paths:
  /api/deployments:
    get:
      tags:
        - Admin
      summary: List deployments
      description: >-
        Returns deployment runs ordered by creation time descending. Pagination
        metadata is returned in `Content-Range` headers.
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          $ref: '#/components/responses/DeploymentList'
        '206':
          $ref: '#/components/responses/DeploymentList'
        '401':
          description: Unauthorized
        '403':
          description: Admin access required
        '500':
          $ref: '#/components/responses/Error'
      security:
        - bearerAuth: []
        - apiKey: []
components:
  parameters:
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        default: 50
      description: Maximum number of deployments to return.
    Offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Number of deployments to skip.
  responses:
    DeploymentList:
      description: Deployment runs
      headers:
        Content-Range:
          schema:
            type: string
          description: Range of deployment records returned, for example `0-49/125`.
        Preference-Applied:
          schema:
            type: string
          description: Count preference applied by the backend.
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Deployment'
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    Deployment:
      type: object
      required:
        - id
        - providerDeploymentId
        - provider
        - status
        - url
        - metadata
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
        providerDeploymentId:
          type: string
          nullable: true
          description: >-
            Provider deployment ID. Null until the provider deployment is
            created.
        provider:
          type: string
          example: vercel
        status:
          $ref: '#/components/schemas/DeploymentStatus'
        url:
          type: string
          nullable: true
          example: https://my-app.vercel.app
        metadata:
          type: object
          nullable: true
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling.
        message:
          type: string
          description: Human-readable error message.
        statusCode:
          type: integer
        nextActions:
          type: string
          description: Suggested action to resolve the error.
    DeploymentStatus:
      type: string
      enum:
        - WAITING
        - UPLOADING
        - QUEUED
        - BUILDING
        - READY
        - ERROR
        - CANCELED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Project admin JWT or an API key passed as a Bearer token.
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````