updateTables Example - cytoscape/cytoscape-web GitHub Wiki

Format of response for updateTables results

[
  {
    "action": "updateTables",
    "data":  {
               "id": string, // Table name, e.g., "node", "edge", "enrichment"
               "columns": [{ "id": attribute_name, "type": attribute_datatype, "default": optional_default_value }],
               "rows": { "row_id": table_record } // `row_id` should be `node_id` for node table and `edge_id` for edge table
             }
  }
]

NOTE: id set to node for node table and edge for edge table

Example:

[
  {
    "action": "updateTables",
    "data": {
                "id": "node", 
                "columns": [{"id": "count", "type": "integer", "notes": "string" }],
                "rows": {
                          "1": { "count": 10, "notes": "lowerest"}
                          "2": { "count": 24} 
                        }
            }
  }
]

When caller receives this result, it should add or update attribute count and notes on nodes 1 and 2 with values specified in "rows". 1 and 2 are the cxid of the node.