Skip to content

Signal Trees and Nodes

List trees

Get list of Trees by name. This API can also be used to get all the Trees in an account.

Method Path
GET /api/1.3/accounts/{account_id}/layouts

Query Parameters

Parameter Required Description
name Yes Name of the Tree. By default, it performs a contains match. To match the exact name, set the value with double quotes.
layoutState Yes State of the Tree. By default, latest as well as published versions of the Tree will be returned. To only get the latest version, set the value as DRAFT.
layoutType Yes Set the value of this field to SIGNAL to look for only Trees.
offset Yes Index to start for the next paginated request. Default value is 0.
limit Yes Number of items to include in each page result. There could be fewer items remaining than the specified value.
$ curl -H "Authorization: Bearer <token>" \
'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts?offset=0&limit=10&layoutType=SIGNAL&layoutState=DRAFT&name="Assets"'
import requests 

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts?offset=0&limit=10&layoutType=SIGNAL&layoutState=DRAFT&name="Assets"'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 

response = requests.get(URL, headers=HEADERS)
print(response.json())

Example response

[
  {
    "id": "989393423730286592",
    "name": "Assets",
    "layoutdefinition": "defaultDefinition",
    "layoutType": "SIGNAL",
    "version": "2",
    "systemLayout": false,
    "layoutState": "DRAFT",
    "type": "entities.layouts",
    "tenant": "xxxxxxxxxxxxxxx",
    "modifiedCount": 0,
    "publishDetails": {
      "id": "1000001081909198848",
      "version": "1",
      "publishedBy": "989076211361882112",
      "publishedTime": "2022-07-22T11:27:17.188000Z"
    },
    "context": {
      "defaultReportId": "989393423742869504"
    },
    "createTime": 1655960174258,
    "updateTime": 1661430053843,
    "links": []
  }
]

Retrieve a tree

Gets a tree by ID. This API can also be used to get a Tree in an account.

Method Path
GET /api/1.3/accounts/{account_id}/layouts/{layout_id}
>
$ curl -H "Authorization: Bearer <token>" \
"https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}"
import requests 

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}'
TOKEN = '<token>'
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 

response = requests.get(URL, headers=HEADERS)
print(response.json())

Example response

{
  "id": "989393423730286592",
  "name": "Assets",
  "layoutdefinition": "defaultDefinition",
  "layoutType": "SIGNAL",
  "version": "2",
  "systemLayout": false,
  "layoutState": "DRAFT",
  "type": "entities.layouts",
  "tenant": "xxxxxxxxxxxxxxx",
  "modifiedCount": 0,
  "publishDetails": {
    "id": "1000001081909198848",
    "version": "1",
    "publishedBy": "989076211361882112",
    "publishedTime": "2022-07-22T11:27:17.188000Z"
  },
  "context": {
    "defaultReportId": "989393423742869504"
  },
  "createTime": 1655960174258,
  "updateTime": 1661430053843,
  "links": []
}

Create a Tree

This API can be used to create a Tree in an account.

Method Path
POST /api/1.3/accounts/{account_id}/layouts
$ curl --location --request POST "https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts"\
--header 'Authorization: Bearer <token>' --header 'Content-Type: application/json' 
--data-raw '{"name": "My first tree"}'
import requests 
import json

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 
PAYLOAD = { "name": "My first tree" } 

response = requests.post(URL, headers=HEADERS, data=json.dumps(PAYLOAD))
print(response.json())

Example response

{
  "id": "989393423730286592",
  "name": "My first tree",
  "layoutdefinition": "defaultDefinition",
  "layoutType": "SIGNAL",
  "version": "2",
  "systemLayout": false,
  "layoutState": "DRAFT",
  "type": "entities.layouts",
  "tenant": "xxxxxxxxxxxxxxx",
  "modifiedCount": 0,
  "context": {
    "defaultReportId": "989393423742869504"
  },
  "createTime": 1655960174258,
  "updateTime": 1661430053843,
  "links": []
}

List tree nodes

Gets the list of Tree Nodes by name. This API can also be used to get all the Nodes for a requested Tree in an account.

Method Path
GET /api/1.3/accounts/{account_id}/layouts/{layout_id}/layoutnodes

Query Parameters

Parameter Required Description
name Yes Name of the Tree Node. By default, it performs a contains match. To match the exact name, set the value with double quotes.
offset Yes Index to start for the next paginated request. Default value is 0.
limit Yes Number of items to include in each page result. There could be fewer items remaining than the specified value.
$ curl -H "Authorization: Bearer <token>" \
'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}/layoutnodes?offset=0&limit=10&name="Furnace"'
import requests 

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}/layoutnodes?offset=0&limit=10&name="Furnace"'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 

response = requests.get(URL, headers=HEADERS)
print(response.json())

Example response

[
  {
    "id": "1012335760224018432",
    "name": "Furnace",
    "layout": "yyyyyyyyyyyyy",
    "layoutdefinition": "defaultDefinition",
    "nodeType": "1",
    "isRoot": true,
    "path": [
      {
        "name": "US",
        "id": "1012335760224018432",
        "seq": 1
      }
    ],
    "materializedPath": "Furnace",
    "modified": true,
    "label": "labelnode",
    "versionHistory": {
      "createVersion": "2"
    },
    "type": "entities.layoutnodes",
    "tenant": "xxxxxxxxxxxxxxx",
    "createTime": 1661430053574,
    "updateTime": 1661430053574,
    "createdBy": "989076211361882112",
    "updatedBy": "pod",
    "archived": false,
    "links": []
  }
]

Retrieve a tree node

Gets a Tree Node by ID. This API can be used to get a specific node for a requested Tree in an account.

Method Path
GET /api/1.3/accounts/{account_id}/layouts/{layout_id}/layoutnodes/{layout_node_id}
$ curl -H "Authorization: Bearer <token>" \
"https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}/layoutnodes/{LAYOUT_NODE_ID}"
import requests 

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}/layoutnodes/{LAYOUT_NODE_ID}'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 

response = requests.get(URL, headers=HEADERS)
print(response.json())

Example response

{
  "id": "1012335760224018432",
  "name": "Furnace",
  "layout": "yyyyyyyyyyyyy",
  "layoutdefinition": "defaultDefinition",
  "nodeType": "1",
  "isRoot": true,
  "path": [
    {
      "name": "US",
      "id": "1012335760224018432",
      "seq": 1
    }
  ],
  "materializedPath": "Furnace",
  "modified": true,
  "label": "labelnode",
  "versionHistory": {
    "createVersion": "2"
  },
  "type": "entities.layoutnodes",
  "tenant": "xxxxxxxxxxxxxxx",
  "createTime": 1661430053574,
  "updateTime": 1661430053574,
  "createdBy": "989076211361882112",
  "updatedBy": "pod",
  "archived": false,
  "links": []
}

Create a tree node

This API can be used to create a node for a requested tree in an account.

Method Path
POST /api/1.3/accounts/{account_id}/layouts/{layout_id}/layoutnodes

Request Payload

The required payload depends on whether you are creating a top-level root node or a nested child node.

To create a root or first-level node, simply provide a name.

{
  "name": "My first tree node"
}

To create a child node, you must include the parent property mapped to the parent's node ID.

{
  "name": "My first child node",
  "parent": "<node_id_of_the_parent_node>"
}

$ curl --location --request POST "https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}/layoutnodes" \
--header 'Authorization: Bearer <token>' --header 'Content-Type: application/json' 
--data-raw '{
      "name": "My first tree node"
          }'
import requests 
import json

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/layouts/{LAYOUT_ID}/layoutnodes'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 
PAYLOAD = { "name": "My first tree node" } 

response = requests.post(URL, headers=HEADERS, data=json.dumps(PAYLOAD))
print(response.json())

Example response

{
  "id": "1012335760224018432",
  "name": "My first tree node",
  "layout": "yyyyyyyyyyyyy",
  "layoutdefinition": "defaultDefinition",
  "nodeType": "1",
  "isRoot": true,
  "path": [],
  "materializedPath": "My first tree node",
  "modified": true,
  "label": "labelnode",
  "type": "entities.layoutnodes",
  "tenant": "xxxxxxxxxxxxxxx",
  "createTime": 1661430053574,
  "updateTime": 1661430053574,
  "createdBy": "989076211361882112",
  "updatedBy": "pod",
  "archived": false,
  "links": []
}