Roles and permissions are now available. Give team members granular permissions. View the docs →
curl --request POST \
--url https://cloud.laravel.com/api/environments/{environment}/instances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"max_replicas": 0,
"min_replicas": 0,
"uses_scheduler": true,
"scaling_cpu_threshold_percentage": 72,
"scaling_memory_threshold_percentage": 72,
"background_processes": [
{
"processes": 5,
"command": "php artisan my:command",
"config": {
"connection": "redis",
"queue": "default,emails",
"tries": 3,
"backoff": 30,
"sleep": 3,
"rest": 0,
"timeout": 60,
"force": false
}
}
]
}
'{
"data": {
"id": "<string>",
"attributes": {
"name": "<string>",
"min_replicas": 123,
"max_replicas": 123,
"shutdown_timeout": 123,
"uses_scheduler": true,
"scaling_cpu_threshold_percentage": 123,
"scaling_memory_threshold_percentage": 123,
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"environment": {
"data": {
"id": "<string>"
}
},
"backgroundProcesses": {
"data": [
{
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"links": {
"self": {
"href": "<string>",
"rel": "<string>",
"describedby": "<string>",
"title": "<string>",
"type": "<string>",
"hreflang": "<string>",
"meta": {}
}
},
"attributes": {
"name": "<string>",
"slug": "<string>",
"created_from_automation": true,
"vanity_domain": "<string>",
"build_command": "<string>",
"deploy_command": "<string>",
"uses_octane": true,
"uses_push_to_deploy": true,
"uses_deploy_hook": true,
"environment_variables": [
{
"key": "<string>",
"value": "<string>"
}
],
"network_settings": {
"cache": {
"strategy": "<string>"
},
"response_headers": {
"frame": "<string>",
"content_type": "<string>",
"hsts": {
"max_age": 123,
"include_subdomains": true,
"preload": true
}
},
"firewall": {
"bot_categories": [],
"rate_limit": {
"429": true,
"4xx": true
},
"under_attack_mode_started_at": "<string>",
"block_path": true
},
"content_converter": true
},
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"application": {
"data": {
"id": "<string>"
}
},
"branch": {
"data": {
"id": "<string>"
}
},
"deployments": {
"data": [
{
"id": "<string>"
}
]
},
"currentDeployment": {
"data": {
"id": "<string>"
}
},
"domains": {
"data": [
{
"id": "<string>"
}
]
},
"primaryDomain": {
"data": {
"id": "<string>"
}
},
"instances": {
"data": [
{
"id": "<string>"
}
]
},
"database": {
"data": {
"id": "<string>"
}
},
"cache": {
"data": {
"id": "<string>"
}
},
"buckets": {
"data": [
{
"id": "<string>"
}
]
},
"websocketApplication": {
"data": {
"id": "<string>"
}
}
}
}
]
}Create a new instance for an environment.
curl --request POST \
--url https://cloud.laravel.com/api/environments/{environment}/instances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"max_replicas": 0,
"min_replicas": 0,
"uses_scheduler": true,
"scaling_cpu_threshold_percentage": 72,
"scaling_memory_threshold_percentage": 72,
"background_processes": [
{
"processes": 5,
"command": "php artisan my:command",
"config": {
"connection": "redis",
"queue": "default,emails",
"tries": 3,
"backoff": 30,
"sleep": 3,
"rest": 0,
"timeout": 60,
"force": false
}
}
]
}
'{
"data": {
"id": "<string>",
"attributes": {
"name": "<string>",
"min_replicas": 123,
"max_replicas": 123,
"shutdown_timeout": 123,
"uses_scheduler": true,
"scaling_cpu_threshold_percentage": 123,
"scaling_memory_threshold_percentage": 123,
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"environment": {
"data": {
"id": "<string>"
}
},
"backgroundProcesses": {
"data": [
{
"id": "<string>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"links": {
"self": {
"href": "<string>",
"rel": "<string>",
"describedby": "<string>",
"title": "<string>",
"type": "<string>",
"hreflang": "<string>",
"meta": {}
}
},
"attributes": {
"name": "<string>",
"slug": "<string>",
"created_from_automation": true,
"vanity_domain": "<string>",
"build_command": "<string>",
"deploy_command": "<string>",
"uses_octane": true,
"uses_push_to_deploy": true,
"uses_deploy_hook": true,
"environment_variables": [
{
"key": "<string>",
"value": "<string>"
}
],
"network_settings": {
"cache": {
"strategy": "<string>"
},
"response_headers": {
"frame": "<string>",
"content_type": "<string>",
"hsts": {
"max_age": 123,
"include_subdomains": true,
"preload": true
}
},
"firewall": {
"bot_categories": [],
"rate_limit": {
"429": true,
"4xx": true
},
"under_attack_mode_started_at": "<string>",
"block_path": true
},
"content_converter": true
},
"created_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"application": {
"data": {
"id": "<string>"
}
},
"branch": {
"data": {
"id": "<string>"
}
},
"deployments": {
"data": [
{
"id": "<string>"
}
]
},
"currentDeployment": {
"data": {
"id": "<string>"
}
},
"domains": {
"data": [
{
"id": "<string>"
}
]
},
"primaryDomain": {
"data": {
"id": "<string>"
}
},
"instances": {
"data": [
{
"id": "<string>"
}
]
},
"database": {
"data": {
"id": "<string>"
}
},
"cache": {
"data": {
"id": "<string>"
}
},
"buckets": {
"data": [
{
"id": "<string>"
}
]
},
"websocketApplication": {
"data": {
"id": "<string>"
}
}
}
}
]
}Documentation Index
Fetch the complete documentation index at: https://cloud.laravel.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
The Bearer Token generated on the Cloud UI.
The environment identifier
3 - 40"service"flex-512mb, flex-1gb, flex-2gb, flex.c-1vcpu-256mb, flex.g-1vcpu-512mb, flex.m-1vcpu-1gb, flex.c-2vcpu-512mb, flex.g-2vcpu-1gb, flex.m-2vcpu-2gb, flex.c-4vcpu-1gb, flex.g-4vcpu-2gb, flex.m-4vcpu-4gb, flex.c-8vcpu-2gb, flex.g-8vcpu-4gb, flex.m-8vcpu-8gb, pro.c-1vcpu-1gb, pro.g-1vcpu-2gb, pro.m-1vcpu-4gb, pro.c-2vcpu-2gb, pro.g-2vcpu-4gb, pro.m-2vcpu-8gb, pro.c-4vcpu-4gb, pro.g-4vcpu-8gb, pro.m-4vcpu-16gb, pro.c-8vcpu-8gb, pro.g-8vcpu-16gb, pro.m-8vcpu-32gb, dedicated.c-1vcpu-2gb, dedicated.g-1vcpu-4gb, dedicated.m-1vcpu-8gb, dedicated.c-2vcpu-4gb, dedicated.g-2vcpu-8gb, dedicated.m-2vcpu-16gb, dedicated.c-4vcpu-8gb, dedicated.g-4vcpu-16gb, dedicated.m-4vcpu-32gb, dedicated.c-8vcpu-16gb, dedicated.g-8vcpu-32gb, dedicated.m-8vcpu-64gb, mq-pro-256mb, mq-pro-512mb, mq-pro-1gb, mq-pro-2gb, mq-pro-4gb, mq-pro-8gb, mq-dedicated-256mb, mq-dedicated-512mb, mq-dedicated-1gb, mq-dedicated-2gb, mq-dedicated-4gb, mq-dedicated-8gb none, custom, auto 1 <= x <= 01 <= x <= 050 <= x <= 9550 <= x <= 95Show child attributes
Was this page helpful?