Generic tools to work with rest api