To get all the assets in a collection in AEM, you can use the Asset Manager API along with the QueryBuilder API. First, you need to retrieve the collection node based on its path or identifier. Then, you can use the listChildren method to get all the assets contained within the collection. Alternatively, you can use the QueryBuilder to perform a query that retrieves all assets within the collection based on specific criteria.