I work on a .NET program retrieving some metadata of a given Salesforce org via the API.
I have already managed to retrieve a list of all standard and custom objects in my salesforce org via the REST API, so I know the names and labels of the objects and I also have a list of all the fields an object contains.
However, I could not find any way to retrieve the names of the FieldSets of an object and—more importantly—the fields that are contained in the FieldSets without having to implement another APEX class on the Salesforce org itself, as suggested in this answer.
How do I retrieve the FieldSets and their Fields of any object via the Salesforce API? I would prefer to do it via REST, but a solution via SOAP is fine if the former is not possible. More important to me is that there is minimum change done on the salesforce org itself, so that the program will "just work" with any org (setting up OAuth is fine, though).