Hello Juan, I think this information you can retrieve using Report API, instead of Provisioning API
Alexandre Jacquet Google Apps Deployment Specialst São Paulo | SP | Brasil Tel.: 55 11 8064 6882 On Fri, Jun 17, 2011 at 3:24 PM, Juan Carlos Lopez <[email protected]>wrote: > Hello Im trying to retreive my user's last login time (and if it has been > logged some time) and the user's actuall quota used. Using the API I get > quota limit but not the actual used space for that user. And had not found > the parameter to see when it was last logged in. This Info for the users is > available when I access my domain admin pannel, but I need to get this info > FROM the API. > > So Is possible?? Im using this PHP code (how ever if you can point me to > any resource I can translate it to what I need) > <?php > require_once "Zend/Loader.php"; > Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); > Zend_Loader::loadClass('Zend_Gdata_Gapps'); > > $domain = "MYDOMAIN"; > $email = "MYADMINEMAIL; > $password = "MYADMINPASS"; > > $client = Zend_Gdata_ClientLogin::getHttpClient($email, $password, > Zend_Gdata_Gapps::AUTH_SERVICE_NAME); > $service = new Zend_Gdata_Gapps($client, $domain); > > $user = $service->retrieveUser('SOMEUSER'); > > echo 'Username: ' . $user->login->userName . "<br />\n"; > echo 'Given Name: ' . $user->name->givenName . "<br />\n"; > echo 'Family Name: ' . $user->name->familyName . "<br />\n"; > echo 'Suspended: ' . ($user->login->suspended ? 'Yes' : 'No') . "<br />\n"; > echo 'Admin: ' . ($user->login->admin ? 'Yes' : 'No') . "<br />\n"; > echo 'Must Change Password: ' . > ($user->login->changePasswordAtNextLogin ? 'Yes' : 'No') . "<br />\n"; > echo 'Has Agreed To Terms: ' . > ($user->login->agreedToTerms ? 'Yes' : 'No') . "<br />\n"; > echo 'Quota: ' . $user->quota . "MB<br />\n"; > ?> > > I Get this response: > > Username: SOMEUSER > Password: > Given Name: Some User Full Name > Family Name: Mail > Suspended: No > Admin: No > Must Change Password: No > Has Agreed To Terms: Yes > Quota: 7168 > > Regards > > -- > 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/-/s_9MByzt-lEJ. > 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. > -- You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group. 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.
