Laravel Deployments API

The Deployments API from Laravel — 13 operation(s) for deployments.

OpenAPI Specification

laravel-deployments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Laravel Cloud Applications Deployments API
  version: 0.0.1
servers:
- url: https://cloud.laravel.com/api
security:
- http: []
tags:
- name: Deployments
paths:
  /environments/{environment}/deployments:
    get:
      operationId: public.environments.deployments.index
      description: Get a list of all deployments for the given environment.
      summary: List deployments
      tags:
      - Deployments
      parameters:
      - name: environment
        in: path
        required: true
        description: The environment identifier
        schema:
          type: string
      - name: filter[status]
        in: query
        schema:
          type: string
      - name: filter[branch_name]
        in: query
        schema:
          type: string
      - name: filter[commit_hash]
        in: query
        schema:
          type: string
      - name: include
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - environment
            - initiator
        explode: false
      responses:
        '200':
          description: Paginated set of `DeploymentResource`
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeploymentResource'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        minimum: 1
                      from:
                        type:
                        - integer
                        - 'null'
                        minimum: 1
                      last_page:
                        type: integer
                        minimum: 1
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                              - string
                              - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                          - url
                          - label
                          - active
                      path:
                        type:
                        - string
                        - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      to:
                        type:
                        - integer
                        - 'null'
                        description: Number of the last item in the slice.
                        minimum: 1
                      total:
                        type: integer
                        description: Total number of items being paginated.
                        minimum: 0
                    required:
                    - current_page
                    - from
                    - last_page
                    - links
                    - path
                    - per_page
                    - to
                    - total
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/EnvironmentResource'
                      - $ref: '#/components/schemas/UserResource'
                required:
                - data
                - links
                - meta
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
    post:
      operationId: public.environments.deployments.store
      description: Initiate a deployment for the given environment.
      summary: Initiate deployment
      tags:
      - Deployments
      parameters:
      - name: environment
        in: path
        required: true
        description: The environment identifier
        schema:
          type: string
      responses:
        '200':
          description: '`DeploymentResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeploymentResource'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/EnvironmentResource'
                      - $ref: '#/components/schemas/UserResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /deployments/{deployment}:
    get:
      operationId: public.deployments.show
      description: Get the details of a specific deployment.
      summary: Get deployment
      tags:
      - Deployments
      parameters:
      - name: deployment
        in: path
        required: true
        description: The deployment identifier
        schema:
          type: string
      - name: include
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - environment
            - initiator
        explode: false
      responses:
        '200':
          description: '`DeploymentResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeploymentResource'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/EnvironmentResource'
                      - $ref: '#/components/schemas/UserResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
  /deployments/{deployment}/logs:
    get:
      operationId: public.deployments.logs
      description: Get the build and deploy logs for a specific deployment.
      summary: Get deployment logs
      tags:
      - Deployments
      parameters:
      - name: deployment
        in: path
        required: true
        description: The deployment identifier
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      build:
                        type: object
                        properties:
                          available:
                            type: boolean
                          steps:
                            type: array
                            items:
                              type: object
                              properties:
                                step:
                                  type: string
                                status:
                                  type: string
                                description:
                                  type: string
                                output:
                                  type: string
                                duration_ms:
                                  type: integer
                                time:
                                  type: string
                              required:
                              - step
                              - status
                              - description
                        required:
                        - available
                        - steps
                      deploy:
                        type: object
                        properties:
                          available:
                            type: boolean
                          steps:
                            type: array
                            items:
                              type: object
                              properties:
                                step:
                                  type: string
                                status:
                                  type: string
                                description:
                                  type: string
                                output:
                                  type: string
                                duration_ms:
                                  type: integer
                                time:
                                  type: string
                              required:
                              - step
                              - status
                              - description
                        required:
                        - available
                        - steps
                    required:
                    - build
                    - deploy
                  meta:
                    type: object
                    properties:
                      deployment_status:
                        type: string
                    required:
                    - deployment_status
                required:
                - data
                - meta
        '422':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                    examples:
                    - Deployment logs are only available for deployments created within the last year.
                required:
                - message
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
  /orgs/{organization}/servers/{server}/sites/{site}/webhooks:
    get:
      operationId: organizations.servers.sites.webhooks.index
      description: 'List all webhooks for the site.


        Processing mode: <small><code>sync</code></small>'
      summary: List site webhooks
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      - name: page[size]
        in: query
        description: The number of results that will be returned per page.
        schema:
          type: integer
          default: 30
      - name: page[cursor]
        in: query
        description: The cursor to start the pagination from.
        schema:
          type: string
      - name: sort
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - created_at
            - -created_at
            - updated_at
            - -updated_at
        explode: false
      responses:
        '200':
          description: Paginated set of `DeploymentWebhookResource`
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeploymentWebhookResource'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
                  meta:
                    type: object
                    properties:
                      path:
                        type:
                        - string
                        - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      next_cursor:
                        type:
                        - string
                        - 'null'
                        description: The "cursor" that points to the next set of items.
                      prev_cursor:
                        type:
                        - string
                        - 'null'
                        description: The "cursor" that points to the previous set of items.
                    required:
                    - path
                    - per_page
                    - next_cursor
                    - prev_cursor
                required:
                - data
                - links
                - meta
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - site:manage-notifications
      x-permissions:
      - server:view
      x-mint:
        metadata:
          noindex: true
      x-processingMode: sync
    post:
      operationId: organizations.servers.sites.webhooks.store
      description: 'Create a new webhook for the site.


        Processing mode: <small><code>async</code></small>'
      summary: Create site webhook
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDeploymentWebhookRequest'
      responses:
        '202':
          description: ''
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
      security:
      - oauth2:
        - site:manage-notifications
      x-permissions:
      - site:manage-notifications
      x-mint:
        metadata:
          noindex: true
      x-processingMode: async
  /orgs/{organization}/servers/{server}/sites/{site}/webhooks/{deploymentWebhook}:
    get:
      operationId: organizations.servers.sites.webhooks.show
      description: 'Get a specific webhook associated with the site.


        Processing mode: <small><code>sync</code></small>'
      summary: Get site webhook
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      - name: deploymentWebhook
        in: path
        required: true
        description: The deployment webhook ID
        schema:
          type: integer
      responses:
        '200':
          description: '`DeploymentWebhookResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeploymentWebhookResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - site:manage-notifications
      x-permissions:
      - server:view
      x-mint:
        metadata:
          noindex: true
      x-processingMode: sync
    delete:
      operationId: organizations.servers.sites.webhooks.destroy
      description: 'Delete a specific webhook from the site.


        Processing mode: <small><code>async</code></small>'
      summary: Delete site webhook
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      - name: deploymentWebhook
        in: path
        required: true
        description: The deployment webhook ID
        schema:
          type: integer
      responses:
        '202':
          description: ''
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - site:manage-notifications
      x-permissions:
      - site:manage-notifications
      x-mint:
        metadata:
          noindex: true
      x-processingMode: async
  /orgs/{organization}/servers/{server}/sites/{site}/deployments:
    get:
      operationId: organizations.servers.sites.deployments.index
      description: 'Show all recent deployments for the site.


        Processing mode: <small><code>sync</code></small>'
      summary: List deployments
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      - name: page[size]
        in: query
        description: The number of results that will be returned per page.
        schema:
          type: integer
          default: 30
      - name: page[cursor]
        in: query
        description: The cursor to start the pagination from.
        schema:
          type: string
      - name: filter[commit_hash]
        in: query
        description: The commit hash of the deployment.
        schema:
          type: string
          examples:
          - 011118f
      - name: filter[commit_message]
        in: query
        description: The commit message of the deployment.
        schema:
          type: string
          examples:
          - WIP
      - name: filter[commit_author]
        in: query
        description: The commit author of the deployment.
        schema:
          type: string
          examples:
          - Taylor Otwell
      - name: sort
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - created_at
            - -created_at
        explode: false
      responses:
        '200':
          description: Paginated set of `DeploymentResource`
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeploymentResource_2'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
                  meta:
                    type: object
                    properties:
                      path:
                        type:
                        - string
                        - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      next_cursor:
                        type:
                        - string
                        - 'null'
                        description: The "cursor" that points to the next set of items.
                      prev_cursor:
                        type:
                        - string
                        - 'null'
                        description: The "cursor" that points to the previous set of items.
                    required:
                    - path
                    - per_page
                    - next_cursor
                    - prev_cursor
                required:
                - data
                - links
                - meta
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - server:view
      x-permissions:
      - server:view
      x-mint:
        metadata:
          noindex: true
      x-processingMode: sync
    post:
      operationId: organizations.servers.sites.deployments.store
      description: 'Trigger a new deployment for the site.


        Processing mode: <small><code>async</code></small>'
      summary: Create deployment
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      responses:
        '202':
          description: '`DeploymentResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeploymentResource_2'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - site:manage-deploys
      x-permissions:
      - site:manage-deploys
      x-mint:
        metadata:
          noindex: true
      x-processingMode: async
  /orgs/{organization}/servers/{server}/sites/{site}/deployments/status:
    get:
      operationId: organizations.servers.sites.deployments.status.show
      description: '


        Processing mode: <small><code>sync</code></small>'
      summary: Get deployment status
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      responses:
        '200':
          description: '`DeploymentStatusResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeploymentStatusResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - server:view
      x-permissions:
      - server:view
      x-mint:
        metadata:
          noindex: true
      x-processingMode: sync
    delete:
      operationId: organizations.servers.sites.deployments.status.destroy
      description: 'Reset the deployment state for the site.


        Processing mode: <small><code>async</code></small>'
      summary: Update deployment state
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      responses:
        '202':
          description: ''
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - site:manage-deploys
      x-permissions:
      - site:manage-deploys
      x-mint:
        metadata:
          noindex: true
      x-processingMode: async
  /orgs/{organization}/servers/{server}/sites/{site}/deployments/script:
    get:
      operationId: organizations.servers.sites.deployments.script.show
      description: '


        Processing mode: <small><code>sync</code></small>'
      summary: Get deployment script
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      responses:
        '200':
          description: '`DeploymentScriptResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeploymentScriptResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - server:view
      x-permissions:
      - server:view
      x-mint:
        metadata:
          noindex: true
      x-processingMode: sync
    put:
      operationId: organizations.servers.sites.deployments.script.update
      description: '


        Processing mode: <small><code>sync</code></small>'
      summary: Update deployment script
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDeploymentScriptRequest'
      responses:
        '200':
          description: '`DeploymentScriptResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeploymentScriptResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
      security:
      - oauth2:
        - site:manage-deploys
      x-permissions:
      - site:manage-deploys
      x-mint:
        metadata:
          noindex: true
      x-processingMode: sync
  /orgs/{organization}/servers/{server}/sites/{site}/deployments/deploy-hook:
    get:
      operationId: organizations.servers.sites.deployments.deploy-hook.show
      description: '


        Processing mode: <small><code>sync</code></small>'
      summary: Get the deployment trigger URL
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      responses:
        '200':
          description: '`DeployHookResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeployHookResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
      security:
      - oauth2:
        - server:view
      x-permissions:
      - site:manage-deploys
      x-mint:
        metadata:
          noindex: true
      x-processingMode: sync
    put:
      operationId: organizations.servers.sites.deployments.deploy-hook.update
      description: 'Regenerate the deployment hook token used for triggering deployment on the deployment URL.


        Processing mode: <small><code>sync</code></small>'
      summary: Update deployment trigger URL
      tags:
      - Deployments
      parameters:
      - name: organization
        in: path
        required: true
        description: The organization slug
        schema:
          type: string
      - name: server
        in: path
        required: true
        description: The server ID
        schema:
          type: integer
      - name: site
        in: path
        required: true
        description: The site ID
        schema:
          type: integer
      responses:
        '200':
          description: '`DeployHookResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeployHookResource'
                required:
   

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/laravel/refs/heads/main/openapi/laravel-deployments-api-openapi.yml