api definition