I might suggest a way to store the set of stats you'd like to pull into your report... so that your API can work across systems, and so the user can have some flexibility in what their report includes. The idea would be:
1) Give the users some place/way to designate the stats to use (the easier, more graphical, the better, but a command line will suffice).
2) Build that list into an array
3) Get the characters into an array
let playerChars = findObjs({type: 'character'}).filter(c => ...);
4) Map/Reduce the characters array using the stat array in a forEach
One other thing to think about would be who will run the script, and what access they should have. So your filter on the findObjs() (which returns an array) should include some check of the message-sender having access to the character and/or being GM (playerIsGM()).
As people have said, there are plenty of script examples to look at in the repo... or post specific questions to this forum. Lots of people willing to help!