WebSockets are here. Bring real-time functionality to your apps, powered by Reverb →
curl --request PUT \
--url https://app.laravel.cloud/api/environments/{environment}/variables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"variables": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'{
"data": {
"id": "<string>",
"type": "environments",
"links": {
"self": {
"href": "<string>",
"rel": "<string>",
"describedby": "<string>",
"title": "<string>",
"type": "<string>",
"hreflang": "<string>",
"meta": {}
}
},
"attributes": {
"name": "<string>",
"slug": "<string>",
"status": "deploying",
"created_from_automation": true,
"vanity_domain": "<string>",
"php_major_version": "<string>",
"build_command": "<string>",
"node_version": "20",
"deploy_command": "<string>",
"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>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"type": "applications",
"attributes": {
"name": "<string>",
"slug": "<string>",
"region": "us-east-2",
"slack_channel": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"repository": {
"full_name": "<string>",
"default_branch": "<string>"
}
},
"relationships": {
"repository": {
"data": {
"type": "repositories",
"id": "<string>"
}
},
"organization": {
"data": {
"type": "organizations",
"id": "<string>"
}
},
"environments": {
"data": [
{
"type": "environments",
"id": "<string>"
}
]
},
"deployments": {
"data": [
{
"type": "deployments",
"id": "<string>"
}
]
},
"defaultEnvironment": {
"data": {
"type": "environments",
"id": "<string>"
}
}
}
}
]
}Replace all environment variables with the provided content.
curl --request PUT \
--url https://app.laravel.cloud/api/environments/{environment}/variables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"variables": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'{
"data": {
"id": "<string>",
"type": "environments",
"links": {
"self": {
"href": "<string>",
"rel": "<string>",
"describedby": "<string>",
"title": "<string>",
"type": "<string>",
"hreflang": "<string>",
"meta": {}
}
},
"attributes": {
"name": "<string>",
"slug": "<string>",
"status": "deploying",
"created_from_automation": true,
"vanity_domain": "<string>",
"php_major_version": "<string>",
"build_command": "<string>",
"node_version": "20",
"deploy_command": "<string>",
"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>"
}
]
}
}
},
"included": [
{
"id": "<string>",
"type": "applications",
"attributes": {
"name": "<string>",
"slug": "<string>",
"region": "us-east-2",
"slack_channel": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"repository": {
"full_name": "<string>",
"default_branch": "<string>"
}
},
"relationships": {
"repository": {
"data": {
"type": "repositories",
"id": "<string>"
}
},
"organization": {
"data": {
"type": "organizations",
"id": "<string>"
}
},
"environments": {
"data": [
{
"type": "environments",
"id": "<string>"
}
]
},
"deployments": {
"data": [
{
"type": "deployments",
"id": "<string>"
}
]
},
"defaultEnvironment": {
"data": {
"type": "environments",
"id": "<string>"
}
}
}
}
]
}The Bearer Token generated on the Cloud UI.
The environment identifier
EnvironmentResource
Show child attributes
environments Show child attributes
deploying, running, hibernating, stopped 20, 22, 24 Show child attributes
Show child attributes
Show child attributes
academic_research, accessibility, advertising_and_marketing, aggregator, ai_assistant, ai_crawler, ai_search, feed_fetcher, monitoring_and_analytics, page_preview, search_engine_crawler, search_engine_optimization, security, social_media_marketing, webhooks, other Show child attributes
challenge, throttle, ban 100, 300, 500, 750, 1000 Show child attributes
Show child attributes
applications Show child attributes
us-east-2, us-east-1, eu-central-1, eu-west-1, eu-west-2, ap-southeast-1, ap-southeast-2, ca-central-1 Show child attributes
Show child attributes
Was this page helpful?