Added debug messages to the api views