Add api endpoint for getitems func.