#984 API: implemented ability to get media tree with access rules