Back to top

API Documentation

Flow

Flows

Get the current configured flows
GET/v1/flow

Returns all currently configured flows

Example URI

GET /v1/flow
Request
HideShow
Body
+ Headers:
Authorization: Bearer JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
{
"id" : "8476897",
"enabled" : "true",
"created" : "1498482705349",
"updated" : "1498482705349",
"service" : "admin",
"servicePath" : "/",
"perseoRules" : {
  "headers" {
    "service": "admin",
    "servicePath" : "/"
  },
  "rules" : [
    "rule_939851_1",
    "rule_939851_2"
  ]
},
"flow" : {
  // Flow description as in input
}
}
]
Response  500
HideShow
Body
{
  "msg": "failed to retrieve data"
}

Configure a new flow
POST/v1/flow

Adds a new flow.

Example URI

POST /v1/flow
Request
HideShow
  • Headers: Authorization: Bearer JWT
Headers
Content-Type: application/json
Body
{
"id" : "8476897",
"service" : "admin",
"servicePath" : "/",
"flow" : {
// Flow description directly from mashup
}
}
Response  200
HideShow
Body
{
"msg" : "flow created",
"flow" : {
  "id" : "8476897",
  "enabled" : "true",
  "created" : "1498482705349",
  "updated" : "1498482705349",
  "service" : "admin",
  "servicePath" : "/",
  "perseoRules" : {
    "headers" {
      "service": "admin",
      "servicePath" : "/"
    },
    "rules" : [
      "rule_939851_1",
      "rule_939851_2"
    ]
  },
  "flow" : {
    // Flow description as in input
  }
}
}
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
Body
+ Headers:
Authorization: Bearer JWT
Response  200
HideShow
Body
{
  "msg": "all flows removed"
}

Flows

Get the current configured flows
GET/v1/flow/

Returns the configuration of a particular flow

Example URI

GET /v1/flow/
Request
HideShow
Body
+ Headers:
Authorization: Bearer JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
"msg" : "ok",
"flow" : {
"id" : "8476897",
"enabled" : "true",
"created" : "1498482705349",
"updated" : "1498482705349",
"service" : "admin",
"servicePath" : "/",
"perseoRules" : {
  "headers" {
    "service": "admin",
    "servicePath" : "/"
  },
  "rules" : [
    "rule_939851_1",
    "rule_939851_2"
  ]
},
"flow" : {
  // Flow description as in input
}
}
}
Response  500
HideShow
Body
{
  "msg": "failed to retrieve data"
}

Reconfigure a specific flow
PUT/v1/flow/

Reconfigure a particular flow - the old config will be removed and the new one will be deployed.

Example URI

PUT /v1/flow/
Request
HideShow
  • Headers: Authorization: Bearer JWT
Headers
Content-Type: application/json
Body
{
"id" : "8476897",
"service" : "admin",
"servicePath" : "/",
"flow" : {
// Flow description directly from mashup
}
}
Response  200
HideShow
Body
{
"msg" : "flow updated",
"flow" : {
  "id" : "8476897",
  "enabled" : "true",
  "created" : "1498482705349",
  "updated" : "1498482705349",
  "service" : "admin",
  "servicePath" : "/",
  "perseoRules" : {
    "headers" {
      "service": "admin",
      "servicePath" : "/"
    },
    "rules" : [
      "rule_939851_1",
      "rule_939851_2"
    ]
  },
  "flow" : {
    // Flow description as in input
  }
}
}
Response  400
HideShow
Body
{
  "msg": "missing flow data"
}
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/

Removes the flow and its configuration.

Example URI

DELETE /v1/flow/
Request
HideShow
Headers
Content-Type: application/json
Body
+ Headers:
Authorization: Bearer JWT
Response  200
HideShow
Body
{
  "msg": "flow removed",
  "id": "8476897"
}
Response  500
HideShow
Body
{
  "msg": "failed to remove flow"
}
Response  404
HideShow
Body
{
  "msg": "given flow is unknown"
}

Generated by aglio on 04 Apr 2018