Skip to main content
PATCH
/
instances
/
{instance}
Update instance
curl --request PATCH \
  --url https://cloud.laravel.com/api/instances/{instance} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "size": "flex.c-1vcpu-256mb",
  "scaling_type": "none",
  "max_replicas": 2,
  "min_replicas": 0,
  "uses_sleep_mode": true,
  "sleep_timeout": 30,
  "uses_scheduler": true,
  "uses_octane": true,
  "uses_inertia_ssr": true,
  "scaling_cpu_threshold_percentage": 72,
  "scaling_memory_threshold_percentage": 72
}
'
{
  "data": {
    "id": "<string>",
    "type": "instances",
    "attributes": {
      "name": "<string>",
      "type": "app",
      "size": "flex.c-1vcpu-256mb",
      "scaling_type": "none",
      "min_replicas": 123,
      "max_replicas": 123,
      "uses_scheduler": true,
      "scaling_cpu_threshold_percentage": 123,
      "scaling_memory_threshold_percentage": 123,
      "created_at": "2023-11-07T05:31:56Z"
    },
    "relationships": {
      "environment": {
        "data": {
          "type": "environments",
          "id": "<string>"
        }
      },
      "backgroundProcesses": {
        "data": [
          {
            "type": "background_processes",
            "id": "<string>"
          }
        ]
      }
    }
  },
  "included": [
    {
      "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": "8.2",
        "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>"
            }
          ]
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

The Bearer Token generated on the Cloud UI.

Path Parameters

instance
string
required

The instance identifier

Body

application/json
name
string
Required string length: 3 - 40
size
enum<string>
Available options:
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
scaling_type
enum<string>
Available options:
none,
custom,
auto
max_replicas
integer
Required range: x >= 1
min_replicas
integer
Required range: 1 <= x <= 0
uses_sleep_mode
boolean
sleep_timeout
integer
Required range: 1 <= x <= 60
uses_scheduler
boolean
uses_octane
boolean
uses_inertia_ssr
boolean
scaling_cpu_threshold_percentage
integer | null
Required range: 50 <= x <= 95
scaling_memory_threshold_percentage
integer | null
Required range: 50 <= x <= 95

Response

InstanceResource

data
InstanceResource · object
required
included
(EnvironmentResource · object | BackgroundProcessResource · object)[]