async def get_entities(
            collection_id: UUID = Path(
                ...,
                description="The collection ID corresponding to the graph to list entities from.",
            ),
            offset: int = Query(
                0,
                ge=0,
                description="Specifies the number of objects to skip. Defaults to 0.",
            ),
            limit: int = Query(
                100,
                ge=1,
                le=1000,
                description="Specifies a limit on the number of objects to return, ranging between 1 and 100. Defaults to 100.",
            ),
            auth_user=Depends(self.providers.auth.auth_wrapper()),
        ) -> WrappedEntitiesResponse:
            """Lists all entities in the graph with pagination support."""
            if (
                # not auth_user.is_superuser
                collection_id not in auth_user.collection_ids
            ):
                raise R2RException(
                    "The currently authenticated user does not have access to the collection associated with the given graph.",
                    403,
                )

            entities, count = await self.services.graph.get_entities(
                parent_id=collection_id,
                offset=offset,
                limit=limit,
            )

            return entities, {  # type: ignore
                "total_entries": count,
            }
Lists all entities in the graph with pagination support.
py/core/main/api/v3/graph_router.py