Development Guides
The KFlow API allows you to controls flows which are excuted from pipeline specifications.
Pipelines are described in the KFlow DSL. The OpenAPI Specification cannot express all the constraints of the KFlows DSL. A CUELang specification is provided in annex. This specification is indicative and should not be considered as the reference (WIP).
Samples​
Refer to the samples folder for topology.json samples. Below api(s) assume that the flow will be deployed in the kosmos (see /v1/kosmos/xxxx) namespace.
Submit a new flow (jobx)​
curl -v POST http://127.0.0.1:9080/kflows/v1/kosmos/jobx -H 'Content-Type: application/json' -d @topology.json
Delete a flow​
curl -v -X DELETE http://127.0.0.1:9080/kflows/v1/kosmos/jobx
With force option for fast resources cleaning:
curl -v -X DELETE http://127.0.0.1:9080/kflows/v1/kosmos/jobx/force=true
Get Flows status​
curl -v http://127.0.0.1:9080/kflows/v1/kosmos -H 'Content-Type: application/json'
[
{
"status":"Completed",
"closeTime":"2024-02-12T13:39:15.809698Z",
"execution": {
"workflow_id":"jobx",
"run_id":"c1e6746a-69bf-412d-abfa-e6fe12142db4"
},
"startTime":"2024-02-12T13:37:36.599425Z",
"type": {
"name":"KFlowDSLAdvance"
}
}
]
Possible values for status are:
- Running
- Completed
- Failed
- Canceled
- Terminated
For a specific flow:
curl -v http://127.0.0.1:9080/kflows/v1/kosmos/myjobid -H 'Content-Type: application/json'