-
Notifications
You must be signed in to change notification settings - Fork 0
GET_categories
Benjamin Bertin edited this page Feb 9, 2015
·
1 revision
This method returns the category tree as nested JSON objects with the first node category being the tree root. Every node has a children
attribute containing an array of nodes and/or groups.
The following JSON code snippet shows a category tree with two categories at the first level both containing two groups:
{
"id": "",
"label": null,
"children": [
{
"id": "http://www.carbondb.org/ontology#c/category_1",
"label": "Category 1 name",
"children": [
{
"id": "gc/coefficient_group_1",
"label": "Coefficient group 1 name",
"type": "COEFFICIENT"
},
{
"id": "gp/process_group_1",
"label": "Process group 1",
"type": "PROCESS"
}
]
},
{
"id": "http://www.carbondb.org/ontology#c/category_2",
"label": "Electricity",
"children": [
{
"id": "gp/process_group_2",
"label": "Process group 2 name",
"type": "PROCESS"
},
{
"id": "gp/process_group_3",
"label": "Process group 3",
"type": "PROCESS"
}
]
}
]
}