See Group by example in section 220.127.116.11. Changes needed in the query and the response.
In the response, each row should be an object with tag "Row" for the array.
Atoms example is also wrong. Has Atoms as an object with an untagged array inside it. Should just be the array.