modified streaming rest apis to return objects rather than array of objects