api retrieve entity by id