Apps
An app is a Docker container deployed and managed on an instance. Apps can be created from a custom image (documented here) or deployed from a reusable template (see App templates). Creating, updating, and deleting an app are asynchronous: they return a workflow you poll until the app settles. Start, stop, and restart are also asynchronous and return a workflow.
List apps in a workspace
/v1/workspaces/{wid}/appsList apps in a workspaceLists all apps owned by a workspace, newest first, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick search by name, image, or ID |
name | string | Filter by app name (partial match) |
image | string | Filter by Docker image (partial match) |
state | string | Filter by resource state (PENDING, AVAILABLE, FAILED, ...) |
instance | integer | Filter to a specific instance ID |
Plus the shared pagination parameters. Returns a paged list of apps, each enriched with a live ContainerLiveStats snapshot when the container is running.
curl -A 'curl/8.5' \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
"https://api.galaxygate.net/v1/workspaces/1524141521580666880/apps"List apps on an instance
/v1/instances/{iid}/appsList apps on an instanceLists all apps deployed on the given instance. Accepts the same query and pagination parameters as the workspace-level list.
Path parameters
| Name | Type | Description |
|---|---|---|
iid | integer | Instance ID |
Query parameters
Same as List apps in a workspace except instance (implicit from the path).
Returns a paged list of apps enriched with live container stats.
Create an app
/v1/instances/{iid}/appsCreate an appCreates a new Docker container app on the given instance and starts a deploy workflow. Requires the Editor role or higher on the workspace.
To deploy from a pre-built template instead, use Deploy from template.
Path parameters
| Name | Type | Description |
|---|---|---|
iid | integer | Instance ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | App name; unique within the workspace |
image | string | yes | Docker image including tag, for example nginx:latest |
environment | object | Key/value environment variables passed to the container | |
mounts | AppVolumeMount[] | Volume mounts (see below) | |
ports | PortMapping[] | Port mappings (see below) | |
domain | string | Custom domain name for the app, for example grafana.galaxygate.app; requires at least one port marked http: true |
AppVolumeMount fields
| Field | Type | Description |
|---|---|---|
host_path | string | Absolute path on the instance host, for example /data/myapp |
container_path | string | Absolute mount path inside the container, for example /var/lib/data |
read_only | boolean | Mount the path read-only |
PortMapping fields
| Field | Type | Description |
|---|---|---|
host_port | integer | Port exposed on the instance host |
container_port | integer | Port the container process listens on |
protocol | string | TCP or UDP |
http | boolean | Whether this port serves HTTP traffic eligible for a custom domain |
curl -X POST -A 'curl/8.5' \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-nginx",
"image": "nginx:latest",
"environment": { "NGINX_PORT": "80" },
"ports": [
{ "host_port": 8080, "container_port": 80, "protocol": "TCP", "http": true }
],
"mounts": [
{ "host_path": "/data/nginx", "container_path": "/usr/share/nginx/html", "read_only": false }
],
"domain": "my-nginx.galaxygate.app"
}' \
"https://api.galaxygate.net/v1/instances/101/apps"Returns 201 Created with a workflow and the new app resource attached. Poll GET /v1/apps/{id} until its state is AVAILABLE.
Fetch an app
/v1/apps/{id}Fetch app detailReturns the full configuration of an app, including port mappings and a live container stats snapshot.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | App ID |
Returns the app detail view enriched with an AppDetailLive object containing the resolved port allocations and a ContainerLiveStats snapshot. The stats block is null if the container has no ID yet (never started).
Update an app
/v1/apps/{id}Update an appUpdates an app's configuration and redeploys the container. All fields are optional; omitted fields are left unchanged. Triggers an asynchronous redeploy.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | App ID |
Request body
| Field | Type | Description |
|---|---|---|
image | string | New Docker image including tag |
environment | object | Replacement set of environment variables |
mounts | AppVolumeMount[] | Replacement volume mounts (see Create an app for field details) |
ports | PortMapping[] | Replacement port mappings (see Create an app for field details) |
Returns a workflow. Poll GET /v1/apps/{id} until state is AVAILABLE.
Delete an app
/v1/apps/{id}Delete an appStops and removes the container, then deletes the app and its port allocations. This is destructive and asynchronous.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | App ID |
Returns a workflow.
Start an app
/v1/apps/{id}/startStart an appStarts a stopped app container. Asynchronous.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | App ID |
Returns a workflow.
Stop an app
/v1/apps/{id}/stopStop an appStops a running app container. Asynchronous.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | App ID |
Returns a workflow.
Restart an app
/v1/apps/{id}/restartRestart an appStops and starts an app container. Asynchronous.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | App ID |
Returns a workflow.
Fetch app metrics
/v1/apps/{id}/metricsFetch app metricsReturns historical CPU, memory, and network time-series metrics for an app container, sourced from Prometheus. Values are raw; the panel normalizes them for display.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | App ID |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Window start, Unix seconds |
end | integer | yes | Window end, Unix seconds |
step | integer | yes | Resolution in seconds (minimum 15) |
Returns an AppMetrics object with four PromMatrix series:
| Field | Unit | Notes |
|---|---|---|
cpu | cores | Fractional core usage. 1.0 = one core fully utilized. Divide by the container's allocated core count for a 0-1 ratio. |
memory | bytes | Current container memory usage. Compare against the memory limit from the live stats block for a utilization ratio. |
network_rx | bytes/sec | Inbound network throughput. Returns 0 for the first ~60 seconds after a container starts and across restarts. |
network_tx | bytes/sec | Outbound network throughput. Same semantics as network_rx. |