api: implement basic resolving