api basic functions