GET https://www.googleapis.com/admin/reports/v1/activity/users/userKey
GET https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive
Person contactToCreate = new Person(); List names = new ArrayList<>(); names.add(new Name().setGivenName("John").setFamilyName("Doe")); contactToCreate.setNames(names); Person createdContact = peopleService.people().createContact(contactToCreate).execute();
String resourceName = "people/c12345"; // existing contact resource name Person contactToUpdate = peopleService.people().get(resourceName) .setPersonFields("names,emailAddresses") .execute(); List emailAddresses = new ArrayList<>(); emailAddresses.add(new EmailAddress().setValue("john.doe@gmail.com")); contactToUpdate.setEmailAddresses(emailAddresses); Person updatedContact = peopleService.people().updateContact(contactToUpdate) .setUpdatePersonFields("emailAddresses") .execute();