add spec for tree api