Skip to content

Application api

Hyrrokkin Application API

The Application API is based on a JSON document that maps from node and configuration pages to locations in a web page on a CSS grid

{
  "topology_id": "example",
  "metadata": {
    "name": "Textgraph Example Application"
  },
  "layouts": [
    {
      "condition": {
        "min_width": 600
      },
      "gap": 10,
      "row-height": 500,
      "cells": {
        "div1": {
          "node_id": "n6ccd1b_0ccd73",
          "page_name":"settings",
          "x": 1,
          "y": 1,
          "w": 1,
          "h": 1
        },
        "div2": {
          "node_id": "n6cff07_982e5a",
          "page_name": "results",
          "x": 2,
          "y": 1,
          "w": 1,
          "h": 2
        },
        "div3": {
          "node_id":"n6cdf47_ef65e2",
          "page_name": "settings",
          "x": 1,
          "y": 2,
          "w": 1,
          "h": 1
        }
      }
    },
    {
      "condition": {
        "max_width": 600
      },
      "gap": 10,
      "row-height": 500,
      "cells": {
        "div1": {
          "node_id": "n6ccd1b_0ccd73",
          "page_name":"settings",
          "x": 1,
          "y": 1,
          "w": 1,
          "h": 1
        },
        "div2": {
          "node_id":"n6cdf47_ef65e2",
          "page_name": "settings",
          "x": 1,
          "y": 3,
          "w": 1,
          "h": 1
        },
        "div3": {
          "node_id": "n6cff07_982e5a",
          "page_name": "results",
          "x": 1,
          "y": 2,
          "w": 1,
          "h": 1
        }
      }
    }
  ]
}