Flow
Resource Group ¶
Flows ¶
Get the current configured flowsGET/v1/flow
Returns all currently configured flows
Example URI
GET /v1/flow
Request
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response
200
Headers
Content-Type: application/json; charset=utf-8
Body
{
"flows": [
{
"name": "firstflow",
"enabled": true,
"id": "dddddddd",
"flow": [],
"created": 1523303385798,
"updated": 1523303385798
}
]
}
Response
500
Body
{
"message": "Failed to list flows"
}
Configure a new flowPOST/v1/flow
Adds a new flow.
Example URI
POST /v1/flow
Request
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Body
{
"id": "8476897",
"service": "admin",
"servicePath": "/",
"flow": [],
"name": "firstflow"
}
Response
200
Headers
Content-Type: application/json; charset=utf-8
Body
{
"message": "ok",
"flow": {
"name": "firstflow",
"enabled": true,
"id": "bbbbbbbb",
"flow": [],
"created": 1523303385798,
"updated": 1523303385798
}
}
Response
400
Body
{
"msg": "missing flow data"
}
Response
500
Body
{
"msg": "failed to insert data"
}
Removes all flowsDELETE/v1/flow
Removes all flows and their configurations.
Example URI
DELETE /v1/flow
Request
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response
200
Body
{
"message": "All flows removed"
}
Flows ¶
Get the current configured flowGET/v1/flow/{id}
Returns the configuration of a particular flow
Example URI
GET /v1/flow/aaaaaaaa
URI Parameters
- id
string
(required) Example: aaaaaaaaThe identifier associated to the flow
Request
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response
200
Headers
Content-Type: application/json; charset=utf-8
Body
{
"message": "ok",
"flow": {
"name": "zeroflow",
"enabled": true,
"id": "aaaaaaaa",
"flow": [],
"created": 1390402619301,
"updated": 1390402619301
}
}
Response
500
Body
{
"msg": "failed to retrieve data"
}
Reconfigure a specific flowPUT/v1/flow/{id}
Reconfigure a particular flow - the old config will be removed and the new one will be deployed.
Example URI
PUT /v1/flow/aaaaaaaa
URI Parameters
- id
string
(required) Example: aaaaaaaaThe identifier associated to the flow
Request
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Body
{
"created": 123456,
"enabled": true,
"flow": [],
"id": "aaaaaaaa",
"name": "emaema",
"updated": 123456
}
Response
200
Headers
Content-Type: application/json; charset=utf-8
Body
{
"message": "ok",
"flow": {
"name": "emaema",
"enabled": true,
"id": "aaaaaaaa",
"flow": [],
"created": 1390402619301,
"updated": 1523391323270
}
}
Response
400
Body
{
"message": "Unknown flow: d7fa79ef",
"flow": "d7fa79ef"
}
Response
404
Body
{
"msg": "given flow is unknown"
}
Response
500
Body
{
"msg": "failed to remove flow"
}
Response
500
Body
{
"msg": "failed to insert data"
}
Remove the flowDELETE/v1/flow/{id}
Removes the flow and its configuration.
Example URI
DELETE /v1/flow/aaaaaaaa
URI Parameters
- id
string
(required) Example: aaaaaaaaThe identifier associated to the flow
Request
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response
200
Body
{
"message": "flow removed",
"flow": {
"name": "emaema",
"enabled": true,
"id": "aaaaaaaa",
"flow": [],
"created": 1390402619301,
"updated": 1523461760729
}
}
Response
500
Body
{
"msg": "failed to remove flow"
}
Response
404
Body
{
"msg": "given flow is unknown"
}