Laravel Instances API
The Instances API from Laravel — 10 operation(s) for instances.
The Instances API from Laravel — 10 operation(s) for instances.
openapi: 3.1.0
info:
title: Laravel Cloud Applications Instances API
version: 0.0.1
servers:
- url: https://cloud.laravel.com/api
security:
- http: []
tags:
- name: Instances
paths:
/environments/{environment}/instances:
get:
operationId: public.environments.instances.index
description: Get a list of all instances for the given environment.
summary: List instances
tags:
- Instances
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
- name: filter[name]
in: query
schema:
type: string
- name: filter[type]
in: query
schema:
type: string
- name: filter[size]
in: query
schema:
type: string
- name: filter[scaling_type]
in: query
schema:
type: string
- name: include
in: query
schema:
type: array
items:
type: string
enum:
- environment
- backgroundProcesses
explode: false
responses:
'200':
description: Paginated set of `InstanceResource`
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/InstanceResource'
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/BackgroundProcessResource'
required:
- data
- links
- meta
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
post:
operationId: public.environments.instances.store
description: Create a new instance for an environment.
summary: Create instance
tags:
- Instances
parameters:
- name: environment
in: path
required: true
description: The environment identifier
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateInstanceRequest'
responses:
'201':
description: '`InstanceResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/InstanceResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/EnvironmentResource'
- $ref: '#/components/schemas/BackgroundProcessResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/instances/sizes:
get:
operationId: public.instances.sizes
description: List all available instance sizes grouped by category.
summary: List instance sizes
tags:
- Instances
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
general:
type: array
items:
type: object
properties:
name:
type: string
label:
type: string
description:
type: string
cpu_type:
type: string
compute_class:
type: string
cpu_count:
type: integer
memory_mib:
type: integer
required:
- name
- label
- description
- cpu_type
- compute_class
- cpu_count
- memory_mib
managed_queue:
type: array
items:
type: object
properties:
name:
type: string
label:
type: string
description:
type: string
cpu_type:
type: string
compute_class:
type: string
cpu_count:
type: number
memory_mib:
type: integer
required:
- name
- label
- description
- cpu_type
- compute_class
- cpu_count
- memory_mib
required:
- general
- managed_queue
required:
- data
/instances/{instance}:
get:
operationId: public.instances.show
description: Get the details of a specific instance.
summary: Get instance
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
- name: include
in: query
schema:
type: array
items:
type: string
enum:
- environment
- backgroundProcesses
explode: false
responses:
'200':
description: '`InstanceResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/InstanceResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/EnvironmentResource'
- $ref: '#/components/schemas/BackgroundProcessResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
patch:
operationId: public.instances.update
description: Update an instance.
summary: Update instance
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateInstanceRequest'
responses:
'200':
description: '`InstanceResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/InstanceResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/EnvironmentResource'
- $ref: '#/components/schemas/BackgroundProcessResource'
required:
- data
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
delete:
operationId: public.instances.destroy
description: Delete an instance.
summary: Delete instance
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
responses:
'204':
description: No content
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/instances/{instance}/pause:
post:
operationId: public.instances.pause
description: Stop dispatching jobs to the queue's workers; queued messages are retained until it is resumed.
summary: Pause a managed queue
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
responses:
'200':
description: '`InstanceResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/InstanceResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/EnvironmentResource'
- $ref: '#/components/schemas/BackgroundProcessResource'
required:
- data
application/json:
schema:
type: string
examples:
- data:
type: instances
id: inst-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
attributes:
name: orders
type: managed_queue
queue_status: available
paused: true
is_default: false
visibility_timeout: 60
polling_interval: 20
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/instances/{instance}/resume:
post:
operationId: public.instances.resume
description: Resume dispatching jobs to the queue's workers after it was paused.
summary: Resume a managed queue
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
responses:
'200':
description: '`InstanceResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/InstanceResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/EnvironmentResource'
- $ref: '#/components/schemas/BackgroundProcessResource'
required:
- data
application/json:
schema:
type: string
examples:
- data:
type: instances
id: inst-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
attributes:
name: orders
type: managed_queue
queue_status: available
paused: false
is_default: false
visibility_timeout: 60
polling_interval: 20
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/instances/{instance}/purge:
post:
operationId: public.instances.purge
description: Permanently delete all messages currently in the queue. This cannot be undone.
summary: Purge a managed queue
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
responses:
'200':
description: '`InstanceResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/InstanceResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/EnvironmentResource'
- $ref: '#/components/schemas/BackgroundProcessResource'
required:
- data
application/json:
schema:
type: string
examples:
- data:
type: instances
id: inst-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
attributes:
name: orders
type: managed_queue
queue_status: available
paused: false
is_default: false
visibility_timeout: 60
polling_interval: 20
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/instances/{instance}/default:
post:
operationId: public.instances.default
description: Make this queue the environment's default, used when a job does not specify a queue.
summary: Set the default managed queue
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
responses:
'200':
description: '`InstanceResource`'
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/InstanceResource'
included:
type: array
items:
anyOf:
- $ref: '#/components/schemas/EnvironmentResource'
- $ref: '#/components/schemas/BackgroundProcessResource'
required:
- data
application/json:
schema:
type: string
examples:
- data:
type: instances
id: inst-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
attributes:
name: orders
type: managed_queue
queue_status: available
paused: false
is_default: true
visibility_timeout: 60
polling_interval: 20
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
'422':
$ref: '#/components/responses/ValidationException'
/instances/{instance}/failed-jobs:
get:
operationId: public.instances.failed-jobs.index
description: Get a list of the jobs that have failed on the given managed queue.
summary: List managed queue failed jobs
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
responses:
'200':
description: Paginated set of `ManagedQueueFailedJobResource`
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ManagedQueueFailedJobResource'
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
required:
- data
- links
- meta
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
/instances/{instance}/failed-jobs/{jobId}/retry:
post:
operationId: public.instances.failed-jobs.retry
description: Re-queue a failed job so it is processed again.
summary: Retry a managed queue failed job
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
- name: jobId
in: path
required: true
description: The identifier of the failed job.
schema:
type: string
responses:
'202':
description: The job is being retried.
content:
application/json:
schema:
type: object
properties:
message:
type: string
const: The job is being retried.
required:
- message
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
/instances/{instance}/failed-jobs/{jobId}:
delete:
operationId: public.instances.failed-jobs.destroy
description: Permanently remove a failed job from the given managed queue.
summary: Delete a managed queue failed job
tags:
- Instances
parameters:
- name: instance
in: path
required: true
description: The instance identifier
schema:
type: string
- name: jobId
in: path
required: true
description: The identifier of the failed job.
schema:
type: string
responses:
'204':
description: The failed job was deleted.
content:
application/json:
schema:
type: string
'404':
$ref: '#/components/responses/ModelNotFoundException'
'403':
$ref: '#/components/responses/AuthorizationException'
components:
schemas:
InstanceType:
type: string
enum:
- app
- service
- queue
- managed_queue
title: InstanceType
Link:
type: object
properties:
href:
type: string
format: uri
rel:
type: string
describedby:
type: string
title:
type: string
type:
type: string
hreflang:
anyOf:
- type: string
- type: array
items:
type: string
meta:
type: object
required:
- href
title: Link
BranchResourceIdentifier:
type: object
properties:
type:
type: string
enum:
- branches
id:
type: string
required:
- type
- id
title: BranchResourceIdentifier
DaemonStrategyType:
type: string
enum:
- none
- growth_rate
- queue_size
title: DaemonStrategyType
ApplicationResourceIdentifier:
type: object
properties:
type:
type: string
enum:
- applications
id:
type: string
required:
- type
- id
title: ApplicationResourceIdentifier
FilesystemResourceIdentifier:
type: object
properties:
type:
type: string
enum:
- filesystems
id:
type: string
required:
- type
- id
title: FilesystemResourceIdentifier
EnvironmentResource:
type: object
properties:
id:
type: string
type:
type: string
enum:
- environments
attributes:
type: object
properties:
name:
type: string
slug:
type: string
status:
$ref: '#/components/schemas/EnvironmentStatus'
created_from_automation:
type: boolean
vanity_domain:
type: string
php_major_version:
type: string
enum:
- '8.2'
- '8.3'
- '8.4'
- '8.5'
build_command:
type:
- string
- 'null'
node_version:
$ref: '#/components/schemas/NodeVersion'
deploy_command:
type:
- string
- 'null'
uses_octane:
type: boolean
uses_hibernation:
type: boolean
hibernation_wake_up_interval:
type:
- integer
- 'null'
uses_push_to_deploy:
type: boolean
uses_deploy_hook:
type: boolean
? ''
: anyOf:
- type: object
properties:
environment_variables:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
required:
- key
- value
required:
- environment_variables
- type: array
items:
type: string
minItems: 0
maxItems: 0
additionalItems: false
network_settings:
type: object
properties:
cache:
type: object
properties:
strategy:
type: string
required:
- strategy
response_headers:
type: object
properties:
frame:
type: string
content_type:
type: string
hsts:
type: object
properties:
max_age:
type: integer
include_subdomains:
type: boolean
preload:
type: boolean
required:
- max_age
- include_subdomains
- preload
required:
- frame
- content_type
- hsts
firewall:
type: object
properties:
bot_categories:
type: array
items:
$ref: '#/components/schemas/BotControlCategory'
rate_limit:
type: object
properties:
level:
$ref: '#/components/schemas/RateLimitLevel'
per_minute:
$ref: '#/components/schemas/RateLimitPerMinute'
4xx:
type: boolean
'429':
type: boolean
required:
- level
- per_minute
- 4xx
- '429'
under_attack_mode_started_at:
type: string
block_path:
type: boolean
required:
- bot_categories
- rate_limit
- under_attack_mode_started_at
- block_path
content_converter:
type: boolean
required:
- cache
- response_headers
- firewall
- content_converter
created_at:
type:
- string
- 'null'
format: date-time
required:
- name
- slug
- status
- created_from_automation
- vanity_domain
- php_major_version
- build_command
- node_version
- deploy_command
- uses_octane
- uses_hibernation
- hibernation_wake_up_interval
- uses_push_to_deploy
- uses_deploy_hook
- null
- network_settings
- created_at
relationships:
type: object
properties:
application:
type: object
properties:
data:
anyOf:
- $ref: '#/components/schemas/ApplicationResourceIdentifier'
- type: 'null'
required:
- data
branch:
type: object
properties:
data:
anyOf:
- $ref: '#/components/schemas/BranchResourceIdentifier'
- type: 'null'
required:
- data
deployments:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DeploymentResourceIdentifier'
required:
- data
currentDeployment:
type: object
properties:
data:
anyOf:
- $ref: '#/components/schemas/DeploymentResourceIdentifier
# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/laravel/refs/heads/main/openapi/laravel-instances-api-openapi.yml