The rest API (both versions) currently do not - as far as I can tell - have an endpoint that allows a user to get a JSON object representing a Git tree, equivalent to the feature provided in the Github API here: https://developer.github.com/v3/git/trees/
I'm with the component team and we're supporting BitBucket as a remote currently, using remotes.js to normalize different remote endpoints into a single unified API - I was able to port over most BitBucket functionality, however, I was not able to add support for trees. See https://github.com/component/remotes.js/pull/14#discussion-diff-11324698R110
The tree call is only necessary for globbing, and we have been able to manage without it for a while but some new issues have arisen, and I am sure more will come - I have a creeping suspicion that the missing tree functionality could be the culprit or will be in the near future.
Ideally a recursive option would exist as well.
Cheers, - Keith Rosenberg (github.com/netpoetica)