App
Use these endpoints to manage App operations on a Crate Operator host. The reference below includes request attributes, response shapes, and executable request examples.
The App object
Required attributes
app_id integer<int32>asset_url stringcallback_url string<uri>deployment_id integer<int32>deployment_strategy DeploymentStrategyDeployment strategy for the app.
domain stringenv_vars map<string, string>environment_id integer<int32>slots map<string, InstancePort>target_version stringteam_id stringOptional attributes
health_check_path string | null/v1/app/instance/binary/deployDeploy or create app via instance model
Platform sends instance IDs (persistent DB keys) and port configs. The operator inspects local state to decide create vs update, then executes and returns instance state and traffic allocations.
Request attributes
Required attributes
app_id integer<int32>asset_url stringcallback_url string<uri>deployment_id integer<int32>deployment_strategy DeploymentStrategyDeployment strategy for the app.
domain stringenv_vars map<string, string>environment_id integer<int32>slots map<string, InstancePort>target_version stringteam_id stringOptional attributes
health_check_path string | nullResponses
202 Accepted400 Bad Request500 Server Error/v1/app/instance/docker/deployDeploy or create docker app via instance model
Platform sends instance IDs and port configs along with docker image info. The operator inspects local state to decide create vs update, then executes and returns instance state and traffic allocations.
Request attributes
Required attributes
app_id integer<int32>callback_url string<uri>deployment_id integer<int32>deployment_strategy DeploymentStrategyDeployment strategy for the app.
domain stringenv_vars map<string, string>environment_id integer<int32>image stringDocker image name (e.g. `registry.example.com/myapp`).
image_tag stringDocker image tag (e.g. `v1.2.3`).
slots map<string, InstancePort>target_version stringteam_id stringOptional attributes
docker_command array<string>health_check_path string | nullOptional HTTP path used for readiness checks (for example `/healthz`).
registry_credentials DockerRegistryCredentialsvolumes array<string>Responses
202 Accepted400 Bad Request500 Server Error/v1/app/binary/deployDeploy or create binary app
Creates the app if it does not yet exist on this host, otherwise performs a rolling deploy. The operator inspects local app state (app directory and systemd units) to decide.
Request attributes
Required attributes
app_id integer<int32>asset_url stringcallback_url string<uri>deployment_id integer<int32>deployment_strategy DeploymentStrategyDeployment strategy for the app.
domain stringenv_vars map<string, string>environment_id integer<int32>instances map<string, BinaryAppInstance>team_id stringOptional attributes
health_check_path string | nullOptional HTTP path used for readiness checks (for example `/healthz`).
Responses
202 Accepted400 Bad Request500 Server Error/v1/app/deploy/{deployment_id}/statusGet operator update status
Parameters
deployment_id string path requiredResponses
200 App Binary Deployment Status404 Not Found/v1/app/instance/deploy/{deployment_id}/statusGet instance deployment status
Parameters
deployment_id integer<int32> path requiredResponses
200 Instance Deployment Status404 Not Found/v1/app/docker/deployDeploy or create docker app
Creates the app if it does not yet exist on this host, otherwise performs a rolling deploy. The operator inspects local app state (app directory and systemd units) to decide.
Request attributes
Required attributes
app_id integer<int32>callback_url string<uri>deployment_id integer<int32>deployment_strategy DeploymentStrategyDeployment strategy for the app.
domain stringenvironment_id integer<int32>image stringDocker image name (e.g. `registry.example.com/myapp`).
image_tag stringDocker image tag (e.g. `v1.2.3`).
instances map<string, BinaryAppInstance>team_id stringOptional attributes
docker_command array<string>env_vars map<string, string>health_check_path string | nullOptional HTTP path used for readiness checks (for example `/healthz`).
registry_credentials DockerRegistryCredentialsvolumes array<string>Responses
202 Accepted400 Bad Request500 Server Error/v1/app/deleteDelete app (remove service and files)
Asynchronously deletes app instances by stopping and removing systemd units, app files, config, and the Caddy route. Accepts multiple instance IDs (e.g. both blue/green slots) for full cleanup.
Request attributes
Required attributes
app_id integer<int32>callback_url string<uri>domain stringenvironment_id integer<int32>instance_ids array<string>team_id stringOptional attributes
deployment_id integer<int32> | nullResponses
202 Accepted — deletion is in progress400 Bad Request500 Server Error/v1/app/domain/updateUpdate app domain route in Caddy
Request attributes
Required attributes
app_id integer<int32>environment_id integer<int32>new_domain stringold_domain stringserver_id stringteam_id stringResponses
200 OK400 Bad Request404 Route not found409 Target domain already exists503 Caddy unavailable/v1/app/startStart app service
Starts the app service instance by instance_id.
Request attributes
Required attributes
app_id integer<int32>callback_url string<uri>domain stringenvironment_id integer<int32>instance_id stringteam_id stringResponses
202 Accepted400 Bad Request500 Server Error/v1/app/stopStop app service
Stops the app service instance by instance_id.
Request attributes
Required attributes
app_id integer<int32>callback_url string<uri>domain stringenvironment_id integer<int32>instance_id stringteam_id stringResponses
202 Accepted400 Bad Request500 Server Error/v1/app/restartRestart app service
Restarts the app service instance by instance_id.
Request attributes
Required attributes
app_id integer<int32>callback_url string<uri>domain stringenvironment_id integer<int32>instance_id stringteam_id stringResponses
202 Accepted400 Bad Request500 Server Error