Add endpoint for listing metrics by prefix
Created by: davecromberge
Adds a way to only list metrics for a given prefix and/or depth:
http://localhost:8080/collections/53ef808de0174cd66ad53cfc/metrics/CHZlcnNpb25z?depth=1
gives:
[
{
"key": "CHZlcnNpb25zB3N0YWdpbmc=",
"parts": [
"versions",
"staging"
]
},
...
}
]
Alternatively, when no prefix is specified, but the depth is given:
http://localhost:8080/collections/53ef808de0174cd66ad53cfc/metrics?depth=1
gives:
[
{
"key": "CHZlcnNpb25z",
"parts": [
"versions"
]
},
{
"key": "B21vbmdvZGI=",
"parts": [
"mongodb"
]
},
...
]
Leaving out both entirely gives the complete listing as before:
http://localhost:8080/collections/53ef808de0174cd66ad53cfc/metrics