Hi,
There are a few open-source projects using API calls to try and provide Pool stats from TrueNAS Scale and TrueNAS Core. One of those being Homepage.
The API calls for Pool stats seems to only show physical space, and not consider RAID configuration, etc, to provide a “real” overview of used and free space.
Further details can be seen here New TrueNAS Core widget support in 0.8.11 · gethomepage/homepage · Discussion #3268 · GitHub and here Feature Request: support RAID for TrueNAS widget pool metrics · gethomepage/homepage · Discussion #3493 · GitHub
Is there an API call that would provide this data?