Laravel Environments API
The Environments API from Laravel — 9 operation(s) for environments.
The Environments API from Laravel — 9 operation(s) for environments.
openapi: 3.1.0
info:
title: Laravel Cloud Applications Environments API
version: 0.0.1
servers:
- url: https://cloud.laravel.com/api
security:
- http: []
tags:
- name: Environments
paths:
/applications/{application}/environments:
get:
operationId: public.applications.environments.index
description: Get a list of all environments for the given application.
summary: List environments
tags:
- Environments
parameters:
- name: application
in: path
required: true
description: The application identifier
schema:
type: string
- name: filter[name]
in: query
schema:
type: string
- name: filter[status]
in: query
schema:
type: string
- name: filter[slug]
in: query
schema:
type: string
- name: include
in: query
schema:
type: array
items:
type: string
enum:
- application
- branch
- deployments
- currentDeployment
- primaryDomain
- instances
- database
- cache
- buckets
- websocketApplication
explode: false
responses:
'200':
description: Paginated set of `EnvironmentResource`
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/EnvironmentResource'
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/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
- links
- meta
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
post:
operationId: public.applications.environments.store
description: Create a new environment.
summary: Create environment
tags:
- Environments
parameters:
- name: application
in: path
required: true
description: The application identifier
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEnvironmentRequest'
responses:
'201':
description: '`EnvironmentResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/environments/{environment}/logs:
get:
operationId: public.environments.logs.index
description: Get a list of logs for the given environment.
summary: List environment logs
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
- name: query
in: query
schema:
type:
- string
- 'null'
- name: type
in: query
schema:
type:
- string
- 'null'
enum:
- all
- application
- access
- null
- name: case_sensitive
in: query
schema:
type:
- boolean
- 'null'
- name: whole_word
in: query
schema:
type:
- boolean
- 'null'
- name: instances[]
in: query
schema:
type: array
items:
type: string
- name: cursor
in: query
description: Pagination cursor from a previous response. Pass this to fetch the next page of logs.
schema:
type:
- string
- 'null'
- name: from
in: query
required: true
schema:
type: string
format: date-time
- name: to
in: query
required: true
schema:
type: string
format: date-time
responses:
'200':
description: Array of `NormalizedLogResource`
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/NormalizedLogResource'
meta:
type: object
properties:
cursor:
type: string
type:
type: string
from:
type: string
to:
type: string
required:
- cursor
- type
- from
- to
required:
- data
- meta
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/environments/{environment}:
get:
operationId: public.environments.show
description: Get a specific environment.
summary: Get environment
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
- name: include
in: query
schema:
type: array
items:
type: string
enum:
- application
- branch
- deployments
- currentDeployment
- primaryDomain
- instances
- database
- cache
- buckets
- websocketApplication
explode: false
responses:
'200':
description: '`EnvironmentResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
patch:
operationId: public.environments.update
description: Update an environment.
summary: Update environment
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEnvironmentRequest'
responses:
'200':
description: '`EnvironmentResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
delete:
operationId: public.environments.destroy
description: Delete an environment.
summary: Delete environment
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
responses:
'204':
description: No content
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/environments/{environment}/start:
post:
operationId: public.environments.start
description: Start an environment and trigger a deployment.
summary: Start environment
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StartEnvironmentRequest'
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'
/environments/{environment}/stop:
post:
operationId: public.environments.stop
description: Stop an environment and cancel any in-progress deployment.
summary: Stop environment
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
responses:
'200':
description: '`EnvironmentResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/environments/{environment}/purge-edge-cache:
post:
operationId: public.environments.purge-edge-cache
description: Purge the edge cache for all domains associated with the environment.
summary: Purge edge cache
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
responses:
'200':
description: '`EnvironmentResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/environments/{environment}/variables:
post:
operationId: public.environments.variables.store
description: Add environment variables to an environment.
summary: Add environment variables
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StoreEnvironmentVariablesRequest'
responses:
'200':
description: '`EnvironmentResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/environments/{environment}/variables/delete:
post:
operationId: public.environments.variables.destroy
description: 'Remove specific environment variables by key name. This operation is atomic: if any of the specified keys do not exist, no variables will be deleted and an error will be returned indicating which keys were missing.'
summary: Delete environment variables
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteEnvironmentVariablesRequest'
responses:
'200':
description: '`EnvironmentResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ApplicationResource'
- $ref: '#/components/schemas/BranchResource'
- $ref: '#/components/schemas/DeploymentResource'
- $ref: '#/components/schemas/DomainResource'
- $ref: '#/components/schemas/InstanceResource'
- $ref: '#/components/schemas/DatabaseSchemaResource'
- $ref: '#/components/schemas/CacheResource'
- $ref: '#/components/schemas/FilesystemResource'
- $ref: '#/components/schemas/WebsocketApplicationResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/environments/{environment}/metrics:
get:
operationId: public.environments.metrics
description: Get metrics for a specific environment.
summary: Get environment metrics
tags:
- Environments
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
- name: period
in: query
schema:
anyOf:
- $ref: '#/components/schemas/MetricPeriod'
- type: 'null'
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
cpu_usage:
type: object
properties:
labels:
type: array
items:
type: string
average:
type: array
items:
type: number
data:
type: array
items:
type: object
properties:
x:
type: string
y:
type: array
items:
type: number
required:
- x
- y
required:
- labels
- average
- data
memory_usage:
type: object
properties:
labels:
type: array
items:
type: string
average:
type: array
items:
type: number
data:
type: array
items:
type: object
properties:
x:
type: string
y:
type: array
items:
type: number
required:
- x
- y
required:
- labels
- average
- data
http_response_count:
type: object
properties:
labels:
type: array
items:
type: string
average:
type: array
items:
type: number
data:
type: array
items:
type: object
properties:
x:
type: string
y:
type: array
items:
type: number
required:
- x
- y
required:
- labels
- average
- data
replica_count:
type: object
properties:
labels:
type: array
items:
type: string
average:
type: array
items:
type: number
data:
type: array
items:
type: object
properties:
x:
type: string
y:
type: array
items:
type: number
required:
- x
- y
required:
- labels
- average
- data
web_workers_count:
type: object
properties:
labels:
type: array
items:
type: string
average:
type: array
items:
type: number
data:
type: array
items:
type: object
properties:
x:
type: string
y:
type: array
items:
type: number
required:
- x
- y
required:
- labels
- average
- data
required:
- cpu_usage
- memory_usage
- http_response_count
- replica_count
- web_workers_count
meta:
type: object
properties:
period:
type: string
available_periods:
type: array
items:
type: string
required:
- period
- available_periods
required:
- data
- meta
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
components:
schemas:
CloudRegion:
type: string
enum:
- us-east-2
- us-east-1
- ca-central-1
- eu-central-1
- eu-west-1
- eu-west-2
- me-central-1
- ap-southeast-1
- ap-southeast-2
- ap-northeast-1
title: CloudRegion
CacheSize:
type: string
enum:
- 250mb
- 1gb
- 2.5gb
- 5gb
- 12gb
- 50gb
- 100gb
- 500gb
- valkey-flex-250mb
- valkey-flex-1gb
- valkey-flex-2.5gb
- valkey-pro.250mb
- valkey-pro.1gb
- valkey-pro.2.5gb
- valkey-pro.5gb
- valkey-pro.12gb
- valkey-pro.25gb
- valkey-pro.50gb
- elasticache.cache.r7g.large
- elasticache.cache.r7g.xlarge
- elasticache.cache.r7g.2xlarge
- elasticache.cache.r7g.4xlarge
- elasticache.cache.r7g.8xlarge
- elasticache.cache.r7g.12xlarge
- elasticache.cache.r7g.16xlarge
- elasticache.cache.c7gn.large
- elasticache.cache.c7gn.xlarge
- elasticache.cache.c7gn.2xlarge
- elasticache.cache.c7gn.4xlarge
- elasticache.cache.c7gn.8xlarge
- elasticache.cache.c7gn.12xlarge
- elasticache.cache.c7gn.16xlarge
title: CacheSize
MetricPeriod:
type: string
enum:
- 6h
- 24h
- 3d
- 7d
- 30d
title: MetricPeriod
WebsocketApplicationResource:
type: object
properties:
id:
type: string
type:
type: string
enum:
- websocketApplications
attributes:
type: object
properties:
name:
type: string
app_id:
type: string
allowed_origins:
type: array
items: {}
ping_interval:
type: integer
activity_timeout:
type: integer
max_message_size:
type: integer
max_connections:
type: integer
created_at:
type:
- string
# --- truncated at 32 KB (84 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/laravel/refs/heads/main/openapi/laravel-environments-api-openapi.yml