Skip to main content
PATCH
/
environments
/
{environment}
Update environment
curl --request PATCH \
  --url https://app.laravel.cloud/api/environments/{environment} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "slug": "<string>",
  "color": "blue",
  "branch": "<string>",
  "uses_push_to_deploy": true,
  "uses_deploy_hook": true,
  "timeout": 32,
  "php_version": "8.2:1",
  "build_command": "<string>",
  "node_version": "20",
  "deploy_command": "<string>",
  "uses_web_server": true,
  "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>",
  "cache_strategy": "default",
  "response_headers_frame": "deny",
  "response_headers_content_type": "nosniff",
  "response_headers_hsts": {
    "max_age": 1,
    "include_subdomains": true,
    "preload": true
  },
  "firewall_rate_limit_level": "challenge",
  "firewall_under_attack_mode": false
}'
{
  "data": {
    "id": "<string>",
    "type": "environments",
    "attributes": {
      "name": "<string>",
      "slug": "<string>",
      "status": "deploying",
      "created_from_automation": true,
      "vanity_domain": "<string>",
      "php_major_version": "8.2",
      "build_command": "<string>",
      "node_version": "20",
      "deploy_command": "<string>",
      "uses_web_server": true,
      "uses_octane": true,
      "uses_hibernation": 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": [
            "academic_research"
          ],
          "rate_limit": {
            "429": true,
            "level": "challenge",
            "per_minute": 100,
            "4xx": true
          },
          "under_attack_mode_started_at": "<string>"
        }
      },
      "created_at": "2023-11-07T05:31:56Z"
    },
    "relationships": {
      "application": {
        "data": {
          "type": "applications",
          "id": "<string>"
        }
      },
      "branch": {
        "data": {
          "type": "branches",
          "id": "<string>"
        }
      },
      "deployments": {
        "data": [
          {
            "type": "deployments",
            "id": "<string>"
          }
        ]
      },
      "currentDeployment": {
        "data": {
          "type": "deployments",
          "id": "<string>"
        }
      },
      "domains": {
        "data": [
          {
            "type": "domains",
            "id": "<string>"
          }
        ]
      },
      "primaryDomain": {
        "data": {
          "type": "domains",
          "id": "<string>"
        }
      },
      "instances": {
        "data": [
          {
            "type": "instances",
            "id": "<string>"
          }
        ]
      }
    },
    "links": {
      "self": {
        "href": "<string>",
        "rel": "<string>",
        "describedby": "<string>",
        "title": "<string>",
        "type": "<string>",
        "hreflang": "<string>",
        "meta": {}
      }
    }
  }
}

Authorizations

Authorization
string
header
required

The Bearer Token generated on the Cloud UI.

Path Parameters

environment
string
required

The environment identifier

Body

application/json
name
string
Required string length: 1 - 40
slug
string
Minimum length: 1
color
enum<string>
Available options:
blue,
green,
orange,
purple,
red,
yellow,
cyan,
gray
branch
string
uses_push_to_deploy
boolean
uses_deploy_hook
boolean
timeout
integer
Required range: 5 <= x <= 60
php_version
enum<string>
Available options:
8.2:1,
8.3:1,
8.4:1
build_command
string | null
Maximum length: 2000
node_version
enum<string>
Available options:
20,
22
deploy_command
string | null
Maximum length: 2000
uses_web_server
boolean
uses_vanity_domain
boolean
database_schema_id
string
cache_id
string
websocket_application_id
string
uses_octane
boolean
sleep_timeout
integer
Required range: 1 <= x <= 60
shutdown_timeout
integer
Required range: 1 <= x <= 600
uses_purge_edge_cache_on_deploy
boolean
nightwatch_token
string | null
Required string length: 44
cache_strategy
enum<string>
Available options:
default,
bypass
response_headers_frame
enum<string>
Available options:
deny,
sameorigin,
all
response_headers_content_type
enum<string>
Available options:
nosniff,
none
response_headers_hsts
object
firewall_rate_limit_level
enum<string>
Available options:
challenge,
throttle,
ban
firewall_under_attack_mode
boolean
default:false

Response

EnvironmentResource

data
object
required