The working of an API