API: lifecycles
POST /api/v1/lifecycles/{entity_name}/processEvent
Section titled “POST /api/v1/lifecycles/{entity_name}/processEvent”Process Event
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
entity_name | path | yes | string | |
Idempotency-Key | header | no | string | Optional. |
Request body: application/json — schema ProcessEventRequest
| Field | Type | Required | Description |
|---|---|---|---|
event | string | no | outlet name on automated steps |
filter | object | null | no | |
lcid | integer | null | no | |
max | integer | no | hard upper bound per call |
Example:
{ "event": "tick", "lcid": 4, "max": 50}Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | ProcessEventResponse |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
POST /api/v1/lifecycles/{entity_name}/{guid}/advance
Section titled “POST /api/v1/lifecycles/{entity_name}/{guid}/advance”Advance
Advance a record via an outlet (analog of Entherium’s advance_record).
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
entity_name | path | yes | string | |
guid | path | yes | integer | |
Idempotency-Key | header | no | string | Optional. |
Request body: application/json — schema AdvanceRequest
| Field | Type | Required | Description |
|---|---|---|---|
detail | object | null | no | |
outlet | string | yes | Outlet name (ok, error, or conditional name) |
Example:
{ "detail": { "note": "verified live" }, "outlet": "ok"}Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | AdvanceResponse |
401 | Missing or invalid authentication credentials | ErrorResponse |
404 | Entity or lifecycle not found | ErrorResponse |
409 | Transition not allowed from the current step | ErrorResponse |
422 | Validation Error | HTTPValidationError |
GET /api/v1/lifecycles/{entity_name}/{guid}/log
Section titled “GET /api/v1/lifecycles/{entity_name}/{guid}/log”Read Log
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
entity_name | path | yes | string | |
guid | path | yes | integer | |
limit | query | no | integer |
Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | array of LifecycleLogRead |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
POST /api/v1/lifecycles/{entity_name}/{guid}/postMessage
Section titled “POST /api/v1/lifecycles/{entity_name}/{guid}/postMessage”Post Message
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
entity_name | path | yes | string | |
guid | path | yes | integer | |
Idempotency-Key | header | no | string | Optional. |
Request body: application/json — schema PostMessageRequest
| Field | Type | Required | Description |
|---|---|---|---|
detail | object | null | no | |
message | string | yes |
Example:
{ "message": "Held back: waiting for the source to confirm the figure."}Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | LifecycleLogRead |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
GET /api/v1/lifecycles/{entity_name}/{guid}/state
Section titled “GET /api/v1/lifecycles/{entity_name}/{guid}/state”Get State
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
entity_name | path | yes | string | |
guid | path | yes | integer |
Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | LifecycleStateResponse |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
POST /api/v1/lifecycles/{entity_name}/{guid}/stepTo
Section titled “POST /api/v1/lifecycles/{entity_name}/{guid}/stepTo”Step To
Auth: Authorization: Bearer <token> required
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
entity_name | path | yes | string | |
guid | path | yes | integer | |
Idempotency-Key | header | no | string | Optional. |
Request body: application/json — schema StepToRequest
| Field | Type | Required | Description |
|---|---|---|---|
comment | string | null | no | |
detail | object | null | no | |
to_step | integer | yes | target step id from LC definition |
Example:
{ "comment": "reviewed; moving to publish-ready", "detail": { "reviewer": "agent" }, "to_step": 3}Responses:
| Code | Meaning | Body |
|---|---|---|
200 | Successful Response | AdvanceResponse |
401 | Missing or invalid authentication credentials | ErrorResponse |
404 | Entity or lifecycle not found | ErrorResponse |
409 | Transition not allowed from the current step | ErrorResponse |
422 | Validation Error | HTTPValidationError |