Implement api session