tree rest api