Skip to content

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

GET/v1/workspaces/{wid}/appsList apps in a workspace

Lists all apps owned by a workspace, newest first, with pagination.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Query parameters

NameTypeDescription
qstringQuick search by name, image, or ID
namestringFilter by app name (partial match)
imagestringFilter by Docker image (partial match)
statestringFilter by resource state (PENDING, AVAILABLE, FAILED, ...)
instanceintegerFilter 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.

bash
curl -A 'curl/8.5' \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  "https://api.galaxygate.net/v1/workspaces/1524141521580666880/apps"

List apps on an instance

GET/v1/instances/{iid}/appsList apps on an instance

Lists all apps deployed on the given instance. Accepts the same query and pagination parameters as the workspace-level list.

Path parameters

NameTypeDescription
iidintegerInstance 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

POST/v1/instances/{iid}/appsCreate an app

Creates 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

NameTypeDescription
iidintegerInstance ID

Request body

FieldTypeRequiredDescription
namestringyesApp name; unique within the workspace
imagestringyesDocker image including tag, for example nginx:latest
environmentobjectKey/value environment variables passed to the container
mountsAppVolumeMount[]Volume mounts (see below)
portsPortMapping[]Port mappings (see below)
domainstringCustom domain name for the app, for example grafana.galaxygate.app; requires at least one port marked http: true

AppVolumeMount fields

FieldTypeDescription
host_pathstringAbsolute path on the instance host, for example /data/myapp
container_pathstringAbsolute mount path inside the container, for example /var/lib/data
read_onlybooleanMount the path read-only

PortMapping fields

FieldTypeDescription
host_portintegerPort exposed on the instance host
container_portintegerPort the container process listens on
protocolstringTCP or UDP
httpbooleanWhether this port serves HTTP traffic eligible for a custom domain
bash
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

GET/v1/apps/{id}Fetch app detail

Returns the full configuration of an app, including port mappings and a live container stats snapshot.

Path parameters

NameTypeDescription
idintegerApp 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

PUT/v1/apps/{id}Update an app

Updates an app's configuration and redeploys the container. All fields are optional; omitted fields are left unchanged. Triggers an asynchronous redeploy.

Path parameters

NameTypeDescription
idintegerApp ID

Request body

FieldTypeDescription
imagestringNew Docker image including tag
environmentobjectReplacement set of environment variables
mountsAppVolumeMount[]Replacement volume mounts (see Create an app for field details)
portsPortMapping[]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

DELETE/v1/apps/{id}Delete an app

Stops and removes the container, then deletes the app and its port allocations. This is destructive and asynchronous.

Path parameters

NameTypeDescription
idintegerApp ID

Returns a workflow.

Start an app

POST/v1/apps/{id}/startStart an app

Starts a stopped app container. Asynchronous.

Path parameters

NameTypeDescription
idintegerApp ID

Returns a workflow.

Stop an app

POST/v1/apps/{id}/stopStop an app

Stops a running app container. Asynchronous.

Path parameters

NameTypeDescription
idintegerApp ID

Returns a workflow.

Restart an app

POST/v1/apps/{id}/restartRestart an app

Stops and starts an app container. Asynchronous.

Path parameters

NameTypeDescription
idintegerApp ID

Returns a workflow.

Fetch app metrics

GET/v1/apps/{id}/metricsFetch app metrics

Returns 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

NameTypeDescription
idintegerApp ID

Query parameters

NameTypeRequiredDescription
startintegeryesWindow start, Unix seconds
endintegeryesWindow end, Unix seconds
stepintegeryesResolution in seconds (minimum 15)

Returns an AppMetrics object with four PromMatrix series:

FieldUnitNotes
cpucoresFractional core usage. 1.0 = one core fully utilized. Divide by the container's allocated core count for a 0-1 ratio.
memorybytesCurrent container memory usage. Compare against the memory limit from the live stats block for a utilization ratio.
network_rxbytes/secInbound network throughput. Returns 0 for the first ~60 seconds after a container starts and across restarts.
network_txbytes/secOutbound network throughput. Same semantics as network_rx.