1. My goal is to get all Information about Users, Groups, Group
Memberships, Permissions to Documents, Sites. Additionally, I want to audit
all user activities.
2. Al lthese information i need to get by using 2 legged oauth mechanism.
3. I am doing the following today to get User data. However I am not able
to get anything other than First name and last name. I am getting The Email
address by appending the domain name to the Login name. Here is the Java
code.
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey("domain.com");
oauthParameters.setOAuthConsumerSecret("MySecretKey");
oauthParameters.setOAuthType(OAuthType.TWO_LEGGED_OAUTH);
OAuthHmacSha1Signer signer = new OAuthHmacSha1Signer();
URL feedUrl = new URL("https://apps-apis.google.com/a/feeds/" + "domain.com"
+ "/user/2.0");
UserService service = new UserService("ProvisiongApiClient");
service.setOAuthCredentials(oauthParameters, signer);
service.useSsl();
UserFeed resultFeed = service.getFeed(feedUrl, UserFeed.class);
int i=0;
for (UserEntry entry : resultFeed.getEntries()) {
Login login = entry.getLogin();
Name name = entry.getSelf().getName();
Quota quota = entry.getQuota();
String email = login.getUserName() + "@" + "domain.com" ;
System.out.println( email + "," + name.getGivenName() + "," +
name.getFamilyName()); // email, first name, last name
i++;
}
4. How do i get the supervisor, department, business unit, etc from the
Provisioning API
5. Can you please help me with issues in (3)?
6. Is my approach correct?
7. How do I get the Documents and sites metadata using 2 legged oauth?
Thanks in advance ..
--
You received this message because you are subscribed to the Google Groups
"Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-apps-mgmt-apis/-/lGjXIQJ8DOMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-apps-mgmt-apis?hl=en.