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

# List Deployments

> List this workspace's deployments, newest first, optionally for one environment.



## OpenAPI

````yaml get /v2/api/projects/{projectId}/workspaces/{workspaceId}/deployments
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v2/api/projects/{projectId}/workspaces/{workspaceId}/deployments:
    get:
      summary: List this workspace's deployments, newest first, …
      description: >-
        List this workspace's deployments, newest first, optionally for one
        environment.
      operationId: GetV2ApiProjectsProjectIdWorkspacesWorkspaceIdDeployments
      parameters:
        - name: apiKey
          in: query
          required: false
          description: >-
            Upsolve API key, generated under Account → Developer settings in the
            Upsolve Hub. Keys are user-scoped: pass organizationId alongside the
            key to select which org to act on.
          schema:
            type: string
            minLength: 1
            description: >-
              Upsolve API key, generated under Account → Developer settings in
              the Upsolve Hub. Keys are user-scoped: pass organizationId
              alongside the key to select which org to act on.
            examples:
              - up_embed_************
          examples:
            example1:
              value: up_embed_************
        - name: organizationId
          in: query
          required: false
          description: >-
            Your Upsolve organization's UUID — the org that owns the API key and
            project. This is NOT a project organization: do not pass a value
            registered via /projects/register-organization, and do not pass an
            `externalId` (only `projectOrganizationId` accepts those). Omit it
            when using an org-bound API key — the org is read from the key and
            any value sent here is ignored. Required only for user-scoped API
            keys (created under Account → Developer settings) and for the
            Supabase JWT path, where the org is ambiguous and membership is
            verified against it.
          schema:
            description: >-
              Your Upsolve organization's UUID — the org that owns the API key
              and project. This is NOT a project organization: do not pass a
              value registered via /projects/register-organization, and do not
              pass an `externalId` (only `projectOrganizationId` accepts those).
              Omit it when using an org-bound API key — the org is read from the
              key and any value sent here is ignored. Required only for
              user-scoped API keys (created under Account → Developer settings)
              and for the Supabase JWT path, where the org is ambiguous and
              membership is verified against it.
            examples:
              - 123e4567-e89b-12d3-a456-426614174000
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
          examples:
            example1:
              value: 123e4567-e89b-12d3-a456-426614174000
        - name: projectId
          in: path
          required: true
          description: The project the workspace belongs to.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The project the workspace belongs to.
        - name: workspaceId
          in: path
          required: true
          description: The workspace.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The workspace.
        - name: environment
          in: query
          required: false
          description: Only deployments to this environment.
          schema:
            description: Only deployments to this environment.
            type: string
        - name: limit
          in: query
          required: false
          description: How many to return, newest first (1–100, default 20).
          schema:
            default: 20
            description: How many to return, newest first (1–100, default 20).
            type: integer
            minimum: 1
            maximum: 100
        - name: offset
          in: query
          required: false
          description: How many of the newest to skip.
          schema:
            default: 0
            description: How many of the newest to skip.
            type: integer
            minimum: 0
            maximum: 9007199254740991
      responses:
        '200':
          description: >-
            GET /v2/api/projects/:projectId/workspaces/:workspaceId/deployments
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      deployments:
                        type: array
                        items:
                          type: object
                          properties:
                            deploymentId:
                              type: string
                              description: The deployment's id.
                            workspaceId:
                              type: string
                              description: The workspace.
                            environment:
                              type: string
                              description: >-
                                The environment deployed to: `production` or a
                                project environment's slug.
                            version:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              description: The version being deployed.
                            previousVersion:
                              type:
                                - integer
                                - 'null'
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            status:
                              type: string
                              enum:
                                - pending
                                - running
                                - succeeded
                                - failed
                                - cancelled
                              description: >-
                                pending (queued), running, succeeded (the
                                pointer moved), failed, or cancelled.
                            steps:
                              type: array
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                    enum:
                                      - compatibility
                                      - test-cases
                                      - rls
                                      - cache
                                    description: >-
                                      compatibility (the version's tables and
                                      columns exist in the environment's
                                      database), test-cases, rls (row-level
                                      security), or cache (the environment's
                                      users' caches warmed).
                                  label:
                                    type: string
                                    description: What the step is called on screen.
                                  status:
                                    type: string
                                    enum:
                                      - pending
                                      - running
                                      - passed
                                      - failed
                                      - skipped
                                      - unavailable
                                    description: How the step went.
                                  detail:
                                    type:
                                      - string
                                      - 'null'
                                  startedAt:
                                    type:
                                      - string
                                      - 'null'
                                  finishedAt:
                                    type:
                                      - string
                                      - 'null'
                                  testRunJobId:
                                    type:
                                      - string
                                      - 'null'
                                required:
                                  - key
                                  - label
                                  - status
                                  - detail
                                  - startedAt
                                  - finishedAt
                                  - testRunJobId
                                additionalProperties: false
                              description: >-
                                The pipeline, in order. Poll the deployment to
                                watch it.
                            error:
                              type:
                                - string
                                - 'null'
                            message:
                              type:
                                - string
                                - 'null'
                            testRunJobId:
                              type:
                                - string
                                - 'null'
                            bypass:
                              type:
                                - object
                                - 'null'
                              properties:
                                userId:
                                  type:
                                    - string
                                    - 'null'
                                at:
                                  type: string
                                  description: When.
                                reason:
                                  type: string
                                  enum:
                                    - checks_skipped
                                    - tests_not_required
                                    - promote
                                  description: >-
                                    checks_skipped: an owner or admin skipped
                                    required tests. tests_not_required:
                                    production requires none and the caller
                                    confirmed deploying without them. promote:
                                    the legacy promote endpoint moved
                                    production.
                              required:
                                - userId
                                - at
                                - reason
                              additionalProperties: false
                            createdBy:
                              type:
                                - string
                                - 'null'
                            createdAt:
                              type: string
                              description: When it was requested.
                            startedAt:
                              type:
                                - string
                                - 'null'
                            finishedAt:
                              type:
                                - string
                                - 'null'
                          required:
                            - deploymentId
                            - workspaceId
                            - environment
                            - version
                            - previousVersion
                            - status
                            - steps
                            - error
                            - message
                            - testRunJobId
                            - bypass
                            - createdBy
                            - createdAt
                            - startedAt
                            - finishedAt
                          additionalProperties: false
                        description: Newest first.
                      hasMore:
                        type: boolean
                        description: Whether older deployments exist past this page.
                    required:
                      - deployments
                      - hasMore
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            GET /v2/api/projects/:projectId/workspaces/:workspaceId/deployments
            Negative response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_2: []
components:
  securitySchemes:
    APIKEY_2:
      type: apiKey
      in: query
      name: apiKey

````

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