rest interface for hprolog