Workflows
Workflows track asynchronous operations. Each endpoint documents whether it returns a workflow. You poll that object until it reaches a terminal state. All path parameters are required. All query parameters are optional. Workspace and instance IDs are decimal strings.
A workflow has these fields:
| Field | Type | Description |
|---|---|---|
id | string | UUID assigned by the workflow engine |
name | string | Workflow type, for example instance.power or instance.provision |
state | string | One of QUEUED, RUNNING, COMPLETED, FAILED, ABORTED, TIMED_OUT |
duration | integer | Elapsed time in seconds |
started | string | ISO-8601 timestamp when execution began |
data | object | Optional workflow metadata. May be null |
progress | object | Optional execution progress on single-workflow fetches |
The progress object carries a detailed view of execution:
| Field | Type | Description |
|---|---|---|
activities | object[] | Activity steps in execution order, each with a name, status, and attempts ({ current, limit }) |
children | object[] | Child workflow executions, each with a workflow_id, name, and status |
completed | integer | Number of activities with status COMPLETED |
total | integer | Total number of activities seen so far |
progress is omitted on list responses. Activity status is one of PENDING, IN_PROGRESS, COMPLETED, FAILED, TIMED_OUT, or CANCELED. Child workflow status uses the workflow states above. Retry attempts start at 1, with 0 before execution. A retry limit of 0 means unlimited attempts.
Fetch a workflow
/v1/workflows/{wfid}Fetch a workflowFetches a single workflow by its ID. The response includes progress.
Staff only
This operation requires a staff session. Use Fetch a workspace workflow with a user-scoped token.
Path parameters
| Name | Type | Description |
|---|---|---|
wfid | string | Workflow ID (UUID) |
Returns 200 OK with a workflow object including progress.
List workspace workflows
/v1/workspaces/{wid}/workflowsList workspace workflowsReturns workflows that belong to a workspace.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | string | Workspace ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick search by workflow ID prefix, name prefix, instance ID, or workspace ID |
id | string[] | Filter to specific workflow IDs |
name | string | Filter by workflow type name, for example instance.power |
instance | string[] | Scope to specific instance IDs |
workspace | string[] | Scope to specific workspace IDs |
status | string[] | Filter by state: QUEUED, RUNNING, COMPLETED, FAILED, ABORTED, TIMED_OUT. Note: filtering by QUEUED alone has no effect because QUEUED has no queryable equivalent in the workflow engine |
started_after | string | ISO-8601 timestamp. Only workflows started at or after this time |
started_before | string | ISO-8601 timestamp. Only workflows started at or before this time |
Plus the shared pagination parameters. Returns 200 OK with a paged list of workflow objects.
curl https://api.galaxygate.net/v1/workspaces/42/workflows \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-A 'curl/8.5'Fetch a workspace workflow
/v1/workspaces/{wid}/workflows/{wfid}Fetch a workspace workflowFetches a single workflow scoped to a workspace. The workspace check prevents cross-tenant access.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | string | Workspace ID |
wfid | string | Workflow ID (UUID) |
Returns 200 OK with a workflow object including progress.
List instance workflows
/v1/workspaces/{wid}/instances/{iid}/workflowsList instance workflowsReturns workflows that were triggered against a specific instance.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | string | Workspace ID |
iid | string | Instance ID |
Query parameters
Same optional query parameters as List workspace workflows.
Plus the shared pagination parameters. Returns 200 OK with a paged list of workflow objects.
curl https://api.galaxygate.net/v1/workspaces/42/instances/101/workflows \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-A 'curl/8.5'