Added intervals endpoint to API