Pre-release. HostCraft is in testing and not yet for sale. These docs describe the current build and may change. Join the waitlist to hear when it launches.
Workflow API
Source: daemon/proto/hostcraft/v1/workflow.proto
WorkflowService
Section titled “WorkflowService”WorkflowService inspects workflow saga runs. A run is visible to the principal that started it and to principals owning the run's account.
| Method | REST route | Permission | Streaming |
|---|---|---|---|
GetWorkflow |
native | SystemRead |
unary |
StreamWorkflow |
native | SystemRead |
server |
GetWorkflow
Section titled “GetWorkflow”/hostcraft.v1.WorkflowService/GetWorkflow
- Request: GetWorkflowRequest
- Response: WorkflowStatus
StreamWorkflow
Section titled “StreamWorkflow”StreamWorkflow streams step events. With id set the stream carries that run only and ends when the run finishes; with id empty it carries every run the caller may see until the client cancels. REST equivalent: GET /ws/workflows (server-sent events).
/hostcraft.v1.WorkflowService/StreamWorkflow
- Request: StreamWorkflowRequest
- Response: WorkflowEvent
Messages
Section titled “Messages”GetWorkflowRequest
Section titled “GetWorkflowRequest”| Field | Type | Number | Description |
|---|---|---|---|
id |
string |
1 | - |
StreamWorkflowRequest
Section titled “StreamWorkflowRequest”| Field | Type | Number | Description |
|---|---|---|---|
id |
string |
1 | - |
WorkflowEvent
Section titled “WorkflowEvent”| Field | Type | Number | Description |
|---|---|---|---|
workflow_id |
string |
1 | - |
name |
string |
2 | - |
phase |
WorkflowPhase |
3 | the run's phase after this event |
step |
string |
4 | - |
error |
string |
5 | - |
at |
google.protobuf.Timestamp |
6 | - |
account_id |
string |
7 | - |
WorkflowStatus
Section titled “WorkflowStatus”| Field | Type | Number | Description |
|---|---|---|---|
id |
string |
1 | - |
name |
string |
2 | workflow definition name, e.g. account.create |
phase |
WorkflowPhase |
3 | - |
started_at |
google.protobuf.Timestamp |
4 | - |
finished_at |
google.protobuf.Timestamp |
5 | - |
current_step |
string |
6 | - |
steps |
repeated WorkflowStep |
7 | - |
error |
string |
8 | - |
account_id |
string |
9 | - |
WorkflowStep
Section titled “WorkflowStep”| Field | Type | Number | Description |
|---|---|---|---|
index |
int32 |
1 | - |
name |
string |
2 | - |
phase |
WorkflowPhase |
3 | - |
started_at |
google.protobuf.Timestamp |
4 | - |
finished_at |
google.protobuf.Timestamp |
5 | - |
error |
string |
6 | - |
compensated |
bool |
7 | - |