ag-grid provides a way to get selected rows using api.getSelectedRows() function. And provides a way to set all rows using api.setRowData([]) function.
api.getSelectedRows()
api.setRowData([])
I don't think there is such a method but you can make your own:
getAllRows() { let rowData = []; this.gridApi.forEachNode(node => rowData.push(node.data)); return rowData; }