The Tooling API has EntityDefinition, which includes the FieldSets
field. From FieldSet should should be able to get:
- Description
- DeveloperName
- MasterLabel
- NamespacePrefix
I tried the following SOQL query against the Tooling API with some success:
Select Id, KeyPrefix, Label, QualifiedApiName, (Select DeveloperName from FieldSets) From EntityDefinition where QualifiedApiName = 'Case'
If I omit the where clause I get a GACK 843676008-103722 (-365459068), which is always fun.
To get the data equivalent to the Apex FieldSetMember class you may need to do one of:
- Create a Metadata package to retrieve the FieldSet and FieldSetItem. This would only give you the API name of the field, if it is required, and if it is a managed field. You would need to look elsewhere in the meta data for the label etc...
- Create your own Apex web method or REST API that exposes the required data. See Is it possible to get an objects fieldsets with the REST API?