fn sync_apps()
Sync the organization's application catalog into the apps resource (paginates to completion)
fn get_app()
Fetch one application (appId argument) with its environments into the app resource
fn create_app()
Create an application (appName/repository/region arguments). Requires the git integration to already be connected in the Cloud UI.
fn delete_app()
Permanently delete an application and everything in it. Gated: confirmAppId must equal appId, and the app must exist in the synced catalog.
fn get_environment()
Fetch one environment's detail (environmentId argument) — env var key names only, never values
fn create_environment()
Create an environment on an application (appId, branch, environmentName arguments).
fn delete_environment()
Permanently delete an environment. Gated: confirmEnvironmentId must equal environmentId, and the environment must appear in the stored app detail (run get_app first).
fn start_environment()
Start a stopped environment (environmentId argument)
fn stop_environment()
Stop an environment. Gated unless it is already stopped: confirmEnvironmentId must match, because stopping a running, hibernating, or mid-deploy environment takes the site offline.
fn set_env_variables()
Add or update environment variables (envVariables argument: JSON [{key,value}]). Values are secrets — never stored or logged.
fn delete_env_variables()
Delete environment variables by key name (envVarKeys argument: JSON array of keys)
fn purge_edge_cache()
Purge the edge cache for an environment (environmentId argument)
fn deploy()
Initiate a deployment of the environment's tracked branch (environmentId argument)
fn wait_deployment()
Poll a deployment (deploymentId argument, or the stored one) until it succeeds or terminally fails (10s interval, 15 min cap). Failures surface the failure reason and log tail.
fn get_deployment_logs()
Fetch build/deploy step logs for a deployment (deploymentId argument, or the stored one)
fn run_command()
Run a shell/artisan command in an environment (environmentId + command arguments) and wait for its output
fn get_domains()
List an environment's domains (environmentId argument)
fn create_domain()
Attach a custom domain to an environment (environmentId + domainName arguments)
fn verify_domain()
Trigger verification for a domain (domainId argument)
fn delete_domain()
Detach a domain. Gated: confirmDomainId must equal domainId, and the domain must be in the stored domains list (run get_domains first).
fn update_app()
Update application settings (appId + updatePayload arguments, e.g. name, slack_channel, default_environment_id)
fn update_environment()
Update environment settings (environmentId + updatePayload arguments, e.g. php_version, build_command, uses_hibernation)
fn attach_database()
Attach a database schema to an environment (environmentId + databaseSchemaId arguments). Run lc-data's list_databases first — the schema ID comes from there.
fn detach_database()
Detach the environment's database schema (environmentId argument). Gated: confirmEnvironmentId must match — a live app loses its database.
fn get_domain()
Fetch one domain's detail (domainId argument)
fn update_domain()
Update a domain (domainId + updatePayload arguments; the API currently supports verification_method)
fn list_deployments()
List an environment's deployment history (environmentId argument)
fn list_commands()
List an environment's command history (environmentId argument)
fn get_environment_logs()
Fetch recent environment logs (environmentId argument; logQuery/logType filters). Messages are truncated; secrets in logs stay in Laravel Cloud, so avoid logging secrets app-side.
fn get_environment_metrics()
Fetch an environment's metrics snapshot (environmentId argument; metricsPeriod optional)
fn upload_avatar()
Upload an application avatar image (appId + avatarPath arguments)
fn delete_avatar()
Remove the application avatar (appId argument)
fn get_organization()
Fetch the organization this token operates on
fn list_regions()
List available Laravel Cloud regions
fn get_usage()
Pull the organization's spend/usage summary (metricsPeriod optional; environmentId optionally narrows to one environment)
Resources
apps(infinite)— Synced application catalog for the organization
app(infinite)— Most recently touched application, with environment list
environment(infinite)— Most recently touched environment (env var key names only, never values)
deployment(30d)— Most recently initiated or inspected deployment
deploymentLogs(30d)— Build/deploy step logs for the last inspected deployment
commandRun(30d)— Result of the last run_command (output truncated)
domains(infinite)— Domains for the most recently inspected environment
domain(infinite)— Most recently inspected single domain
deployments(30d)— Deployment history for the most recently listed environment
commands(30d)— Command history for the most recently listed environment
environmentLogs(7d)— Recent logs for the most recently inspected environment
environmentMetrics(7d)— Metrics snapshot for the most recently inspected environment
organization(infinite)— The organization this token operates on
regions(7d)— Available Laravel Cloud regions
usage(30d)— Latest spend/usage pull for the organization