Skip to content

Console APIs

Nitish Goyal edited this page Oct 3, 2018 · 7 revisions

Console APIs are used to create, update and delete consoles.

Creating a console

To create a console, create console API is used

_Endpoint:_ /foxtrot/v2/consoles

HTTP Method: POST

Content-type application/json

Returns: HTTP 201/Created on success

Parameters:

name (Required) - Name of the console

sections - list of console sections

Request

{
  "id": "console-test",
  "name": "Console-Test",
  "sections": [
    {
      "id": "",
      "name": "",
      "tileList": [
        "76ea9952-647d-4b8b-bc8a-4ed6e40352c7"
      ],
      "tileData": {
        "76ea9952-647d-4b8b-bc8a-4ed6e40352c7": {
          "id": "76ea9952-647d-4b8b-bc8a-4ed6e40352c7",
          "title": "Payment",
          "tileContext": {
            "period": "minutes",
            "timeframe": "5",
            "nesting": [
              "eventData.eventType"
            ],
            "uniqueKey": null,
            "ignoreDigits": "0",
            "selectedValue": "",
            "widgetType": "full",
            "table": "payment",
            "chartType": "bar",
            "filters": [],
            "uiFiltersList": [
              "CONFIRMATION_CREATED"
            ],
            "row": 1,
            "isnewRow": true,
            "tabName": "",
            "position": 1,
            "widgetSize": 12
          },
          "children": []
        }
      }
    }
  ]
}

Getting all consoles

To get all console, getAll API is used

Endpoint: /foxtrot/v2/consoles

HTTP Method: GET

Content-type: application/json

Returns: HTTP 200/OK

Response:

Returns a list of console objects

Getting console using id

To get a console using id, get API is used

Endpoint: /foxtrot/v2/consoles/{id}

HTTP Method: GET

Content-type application/json

Returns: HTTP 200/OK

Response :

Returns the console object

Delete a console

To delete a console using id, delete API is used

Endpoint: /foxtrot/v2/consoles/{id}

HTTP Method: DELETE

Content-type application/json

Returns: HTTP 200/OK