curl --request PATCH \
--url https://cloud.laravel.com/api/environments/{environment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"branch": "<string>",
"uses_push_to_deploy": true,
"uses_deploy_hook": true,
"timeout": 32,
"build_command": "<string>",
"deploy_command": "<string>",
"uses_vanity_domain": true,
"database_schema_id": "<string>",
"cache_id": "<string>",
"websocket_application_id": "<string>",
"uses_octane": true,
"sleep_timeout": 30,
"shutdown_timeout": 300,
"uses_purge_edge_cache_on_deploy": true,
"nightwatch_token": "<string>",
"firewall_block_path": true,
"firewall_browser_integrity_check": true,
"filesystem_keys": [
{
"id": "<string>",
"disk": "<string>",
"is_default_disk": true
}
]
}
'{
"data": {
"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>"
}
}
}
},
"included": [
{
"id": "<string>",
"attributes": {
"name": "<string>",
"slug": "<string>",
"slack_channel": "<string>",
"avatar_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"repository": {
"full_name": "<string>",
"default_branch": "<string>"
}
},
"relationships": {
"repository": {
"data": {
"id": "<string>"
}
},
"organization": {
"data": {
"id": "<string>"
}
},
"environments": {
"data": [
{
"id": "<string>"
}
]
},
"deployments": {
"data": [
{
"id": "<string>"
}
]
},
"defaultEnvironment": {
"data": {
"id": "<string>"
}
}
}
}
]
}Update environment
Update an environment.
curl --request PATCH \
--url https://cloud.laravel.com/api/environments/{environment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"branch": "<string>",
"uses_push_to_deploy": true,
"uses_deploy_hook": true,
"timeout": 32,
"build_command": "<string>",
"deploy_command": "<string>",
"uses_vanity_domain": true,
"database_schema_id": "<string>",
"cache_id": "<string>",
"websocket_application_id": "<string>",
"uses_octane": true,
"sleep_timeout": 30,
"shutdown_timeout": 300,
"uses_purge_edge_cache_on_deploy": true,
"nightwatch_token": "<string>",
"firewall_block_path": true,
"firewall_browser_integrity_check": true,
"filesystem_keys": [
{
"id": "<string>",
"disk": "<string>",
"is_default_disk": true
}
]
}
'{
"data": {
"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>"
}
}
}
},
"included": [
{
"id": "<string>",
"attributes": {
"name": "<string>",
"slug": "<string>",
"slack_channel": "<string>",
"avatar_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"repository": {
"full_name": "<string>",
"default_branch": "<string>"
}
},
"relationships": {
"repository": {
"data": {
"id": "<string>"
}
},
"organization": {
"data": {
"id": "<string>"
}
},
"environments": {
"data": [
{
"id": "<string>"
}
]
},
"deployments": {
"data": [
{
"id": "<string>"
}
]
},
"defaultEnvironment": {
"data": {
"id": "<string>"
}
}
}
}
]
}Authorizations
The Bearer Token generated on the Cloud UI.
Path Parameters
The environment identifier
Body
1 - 40^[A-Za-z0-9 _-]+$1blue, green, orange, purple, red, yellow, cyan, gray 5 <= x <= 608.2:1, 8.3:1, 8.4:1, 8.5:1 200020, 22, 24 2000The identifier of the database schema to attach to the environment. Send null or an empty string to detach the database, or skip it entirely to leave it unchanged.
The identifier of the cache to attach to the environment. Send null or an empty string to detach the cache, or skip it entirely to leave it unchanged.
The identifier of the WebSocket application to attach to the environment. Send null or an empty string to detach the WebSocket application, or skip it entirely to leave it unchanged.
1 <= x <= 601 <= x <= 60044default, bypass deny, sameorigin, all nosniff, none index, follow, noindex, nofollow Show child attributes
Show child attributes
An array of the object storage buckets that should be attached to the environment. Send an emtpy array ([]) to detach all buckets.
Show child attributes
Show child attributes
Response
EnvironmentResource
Show child attributes
Show child attributes
- ApplicationResource
- BranchResource
- DeploymentResource
- DomainResource
- InstanceResource
- DatabaseSchemaResource
- CacheResource
- FilesystemResource
- WebsocketApplicationResource
Show child attributes
Show child attributes
Was this page helpful?

