I am attempting to use the Tooling API to retrieve all the data for a particular profile. According to the Tooling API documentation from v32 there is a Profile object which contains a set of ProfileMetadata. I am running the following anonymous code:
HttpRequest req = new HttpRequest();
req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());
req.setHeader('Content-Type', 'application/json');
req.setEndpoint('https://na11.salesforce.com/services/data/v32.0/tooling/sobjects/Profile/00eA0000000WrUv');
req.setMethod('GET');
Http h = new Http();
HttpResponse res = h.send(req);
system.debug(res.getBody());
The profile being referenced is a custom profile with permissions on objects etc however the debug output is as shown at https://gist.github.com/pbattisson/7a20ebfbf0d6591f239f
As you can see certain data is not coming through (objectPermissions is what I need out of this) and I wondered if anybody had any idea how to get that data? Thanks.