MetadataAPI includes all the information you need. In addition, the link you shared refers to PermissionSet class which extends Metadata as mentioned there.
PermissionSet -
Represents a set of permissions that's used to grant additional access to one or more users without changing their profile or reassigning profiles. You can use permission sets to grant access but not to deny access.
This type extends the Metadata metadata type and inherits its fullName field.
The only thing is to know how to use MetadataAPI, below is an example which will help you.
- Go to mdapi in github and use the MetadataService and MetadataServiceExample classes.
Write the code below in the developer console execute:
MetadataService.MetadataPort service;
service = MetadataServiceExamples.createService(baseURL, sessionId);
List<MetadataService.ListMetadataQuery> queries = new List<MetadataService.ListMetadataQuery>();
MetadataService.ListMetadataQuery queryForMetaData = new MetadataService.ListMetadataQuery();
queryForMetaData.type_x = typeToQuery;
queries.add(queryForMetaData);
String[] fullNames = new List<String>();
MetadataService.FileProperties[] fileProperties = service.listMetadata(queries, 42);
for(MetadataService.FileProperties fileProperty : fileProperties){
fullNames.add(fileProperty.fullName);
}
MetadataService.IReadResult readResult = new MetadataService.ReadPermissionSetResult();
readResult = service.readMetadata(metadataType,fullNames);
List<MetadataService.Metadata> listForLoop = readResult.getRecords();
for(MetadataService.Metadata temp : listForLoop){
MetadataService.PermissionSet obj = (MetadataService.PermissionSet) temp;
system.debug(obj.classAccesses); // retrieves apex classes permission
system.debug(obj.tabSettings); // retrieves tab setting
system.debug(obj.pageAccesses); // retrieves visualforce pages
system.debug(obj.objectPermissions); // retrieves CRUD permission per object
}
- in the MetadataServiceExample class, pay attention that the sessionId there is set well.
Let me know if you face some issues.