Back to top

Flow

Resource Group

Flows

Get the current configured flows
GET/v1/flow

Returns all currently configured flows

Example URI

GET /v1/flow
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "flows": [
    {
      "name": "firstflow",
      "enabled": true,
      "id": "dddddddd",
      "flow": [],
      "created": 1523303385798,
      "updated": 1523303385798
    }
  ]
}
Response  500
HideShow
Body
{
  "message": "Failed to list flows"
}

Configure a new flow
POST/v1/flow

Adds a new flow.

Example URI

POST /v1/flow
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Body
{
  "id": "8476897",
  "service": "admin",
  "servicePath": "/",
  "flow": [],
  "name": "firstflow"
}
Response  200
HideShow
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
HideShow
Body
{
  "msg": "missing flow data"
}
Response  500
HideShow
Body
{
  "msg": "failed to insert data"
}

Removes all flows
DELETE/v1/flow

Removes all flows and their configurations.

Example URI

DELETE /v1/flow
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response  200
HideShow
Body
{
  "message": "All flows removed"
}

Flows

Get the current configured flow
GET/v1/flow/{id}

Returns the configuration of a particular flow

Example URI

GET /v1/flow/aaaaaaaa
URI Parameters
HideShow
id
string (required) Example: aaaaaaaa

The identifier associated to the flow

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response  200
HideShow
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
HideShow
Body
{
  "msg": "failed to retrieve data"
}

Reconfigure a specific flow
PUT/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
HideShow
id
string (required) Example: aaaaaaaa

The identifier associated to the flow

Request
HideShow
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
HideShow
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
HideShow
Body
{
  "message": "Unknown flow: d7fa79ef",
  "flow": "d7fa79ef"
}
Response  404
HideShow
Body
{
  "msg": "given flow is unknown"
}
Response  500
HideShow
Body
{
  "msg": "failed to remove flow"
}
Response  500
HideShow
Body
{
  "msg": "failed to insert data"
}

Remove the flow
DELETE/v1/flow/{id}

Removes the flow and its configuration.

Example URI

DELETE /v1/flow/aaaaaaaa
URI Parameters
HideShow
id
string (required) Example: aaaaaaaa

The identifier associated to the flow

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer JWT
Response  200
HideShow
Body
{
  "message": "flow removed",
  "flow": {
    "name": "emaema",
    "enabled": true,
    "id": "aaaaaaaa",
    "flow": [],
    "created": 1390402619301,
    "updated": 1523461760729
  }
}
Response  500
HideShow
Body
{
  "msg": "failed to remove flow"
}
Response  404
HideShow
Body
{
  "msg": "given flow is unknown"
}

Generated by aglio on 02 Oct 2018