adding getList api endpoint for generic models