/hierarchies/{instance_id}/{dimension_name}
GET
Get the root of the hierarchy for the given dimension name
Responses
200: The hierarchy root was found and returned
Example value
{
"description": "The top-level node of a hierarchy",
"type": "object",
"properties": {
"children": {
"description": "The children of the top-level node of this hierarchy",
"type": "array",
"items": {
"type": "object",
"properties": {
"has_data": {
"description": "True if the instance has an observation for this code",
"type": "boolean"
},
"label": {
"description": "The label for this child node",
"type": "string"
},
"links": {
"description": "A list of links related to this node",
"type": "object",
"properties": {
"code": {
"description": "A link to a given resource",
"type": "object",
"properties": {
"href": {
"type": "string"
},
"id": {
"type": "string"
}
},
"readOnly": true
},
"self": {
"description": "A link to the given resource",
"type": "object",
"properties": {
"href": {
"description": "A url to this resource",
"type": "string"
}
},
"readOnly": true
}
},
"readOnly": true,
"example": {
"code": {
"href": "http://codelist/code-lists/clist1/codes/xyz987",
"id": "xyz987"
},
"self": {
"href": "http://hierarchy-api/hierarchies/instance_id1/dimension1"
}
}
},
"no_of_children": {
"description": "The number of child nodes that this node has",
"type": "integer"
}
},
"readOnly": true,
"example": {
"has_data": "yes",
"label": "Transport",
"links": {
"code": {
"href": "http://codelist-api/code-lists/{code-list-id}/codes/01",
"id": 987
},
"self": {
"href": "http://hierarchy-api/hierarchies/{instance_id}/Special_Aggregat/123"
}
},
"no_of_children": 3
}
}
},
"has_data": {
"description": "True if the instance has an observation for this code",
"type": "boolean"
},
"label": {
"description": "A label for this node",
"type": "string"
},
"links": {
"description": "A list of links related to this node",
"type": "object",
"properties": {
"code": {
"description": "A link to a given resource",
"type": "object",
"properties": {
"href": {
"type": "string"
},
"id": {
"type": "string"
}
},
"readOnly": true
},
"self": {
"description": "A link to the given resource",
"type": "object",
"properties": {
"href": {
"description": "A url to this resource",
"type": "string"
}
},
"readOnly": true
}
},
"readOnly": true,
"example": {
"code": {
"href": "http://codelist/code-lists/clist1/codes/xyz987",
"id": "xyz987"
},
"self": {
"href": "http://hierarchy-api/hierarchies/instance_id1/dimension1"
}
}
},
"no_of_children": {
"description": "The number of child nodes that this node has",
"type": "integer"
}
}
}
404: Instance or dimension name not found
Example value
null
500: Failed to process the request due to an internal error
Example value
null