Operations (sample payloads)
Main operations
Add member to group
Adds a user to the specified group. Sample Input Sample Output
Check group membership
Checks whether the given user is a member of the group. Membership can be direct or nested. Sample Input Sample Output
Create data transfer
Creates a data transfer request. Sample Input
{
"access_token": "ya29.a0AWY7CklhO1J3M2...",
"new_owner_user_id": "john.doe@example.com",
"old_owner_user_id": "jane.smith@example.com",
"application_data_transfers": [
{
"application_id": "55656082996",
"application_transfer_params": [
\{
"key": "DRIVE_TRANSFER_MODE",
"value": [
"TRANSFER_OWNERSHIP"
]
\},
\{
"key": "CALENDAR_TRANSFER_MODE",
"value": [
"TRANSFER_ALL"
]
\}
]
}
]
}
Sample Output
Create group
Creates a group. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgVmOu3X9zJ2K-Uj_lKx8Xt4Zn...",
"name": "Marketing Team",
"description": "This group is for all members of the marketing department. Use this group for team-wide communications, project updates, and sharing relevant resources.",
"email": "marketing@example.com"
\}
Sample Output
Create organisational unit
Adds an organizational unit. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXhYZ1234567890abcdefghijklmnopqrstuvwxyz",
"customer": "C01234567",
"name": "sales_support",
"block_inheritance": false,
"description": "Sales Support Team",
"parent_org_unit_path": "/corp/sales"
\}
Sample Output
\{
"kind": "admin#directory#orgUnit",
"etag": "\"abcdefghijklmnop\"",
"name": "sales_support",
"description": "Sales Support Team",
"orgUnitPath": "/corp/sales/sales_support",
"orgUnitId": "id:03a98765",
"parentOrgUnitPath": "/corp/sales",
"parentOrgUnitId": "id:02b87654",
"blockInheritance": false
\}
Create role
Creates a role. Sample Input Sample Output
{
"kind": "admin#directory#role",
"etag": "\"abcdefghijklmnop\"",
"roleId": 12345,
"roleName": "Project Manager",
"roleDescription": "Manages projects and team resources",
"rolePrivileges": [
\{
"privilegeName": "MANAGE_PROJECTS",
"serviceId": "00000001"
\},
\{
"privilegeName": "VIEW_TEAM_CALENDAR",
"serviceId": "00000002"
\}
],
"isSystemRole": false,
"isSuperAdminRole": false
}
Create role
Creates a role. Sample Input
{
"access_token": "ya29.a0AfH6SMBgYmO3XzD1Kj-Xh_vZJOXGGK8JVS0Ej-mT9rKzC3kqHpY",
"customer": "C03az8m9z",
"role_id": "12345",
"role_name": "Project Manager",
"role_description": "Manages projects and team resources",
"role_privileges": [
\{
"privilege_name": "MANAGE_PROJECTS",
"service_id": "PROJECT_SERVICE"
\},
\{
"privilege_name": "VIEW_TEAM_CALENDAR",
"service_id": "CALENDAR_SERVICE"
\}
],
"is_system_role": false,
"is_super_admin_role": false
}
Sample Output
Create role assignment
Creates a role assignment. Sample Input Sample Output
\{
"kind": "admin#directory#roleAssignment",
"etag": "\"abcdefghijklmnop\"",
"roleAssignmentId": 987654,
"roleId": 12345,
"assignedTo": "user123@example.com",
"scopeType": "ORG_UNIT",
"orgUnitId": "ou_abc123"
\}
Create schema
Create schema. Sample Input
{
"access_token": "ya29.a0AWY7CklhD8j_kJ2xM5JbFtCq9Cj3k4lZ2pQwX7Y-vN6R8zHmLK1s",
"customer": "C03az79cb",
"schema_name": "employee_info",
"display_name": "Employee Information",
"fields": [
\{
"display_name": "Employee ID",
"field_name": "employee_id",
"field_type": "STRING",
"indexed": true,
"multi_valued": false,
"read_access_type": "ADMINS_AND_SELF"
\},
\{
"display_name": "Hire Date",
"field_name": "hire_date",
"field_type": "DATE",
"indexed": true,
"multi_valued": false,
"read_access_type": "ALL_DOMAIN_USERS"
\},
{
"display_name": "Salary",
"field_name": "salary",
"field_type": "DOUBLE",
"indexed": true,
"multi_valued": false,
"read_access_type": "ADMINS_AND_SELF",
"numeric_indexing_spec": \{
"min_value": 0,
"max_value": 1000000
\}
}
]
}
Sample Output
Create shared contact
Create a new shared contact Sample Input
{
"access_token": "ya29.a0AWY7CklhO1234567890abcdefghijklmnopqrstuvwxyz",
"user_email": "user@example.com",
"name": \{
"given_name": "John",
"family_name": "Doe",
"full_name": "John Doe"
\},
"email": [
{
"attributes": \{
"address": "johndoe@example.com",
"rel": "http://schemas.google.com/g/2005#work",
"primary": true
\}
}
],
"phone_number": [
{
"attributes": {
"rel": "http://schemas.google.com/g/2005#mobile"
},
"text": "+1234567890"
}
],
"organization": [
{
"attributes": {
"rel": "http://schemas.google.com/g/2005#work"
},
"organization_name": "Acme Inc.",
"organization_title": "Software Engineer"
}
],
"atom_content": "Notes about John Doe"
}
Sample Output
{
"entry": {
"id": "http://www.google.com/m8/feeds/contacts/user%40example.com/base/1234567890",
"updated": "2023-05-10T15:30:45.123Z",
"app:edited": \{
"value": "2023-05-10T15:30:45.123Z",
"xmlns:app": "http://www.w3.org/2007/app"
\},
"category": \{
"scheme": "http://schemas.google.com/g/2005#kind",
"term": "http://schemas.google.com/contact/2008#contact"
\},
"title": "John Doe",
"link": [
\{
"rel": "self",
"type": "application/atom+xml",
"href": "https://www.google.com/m8/feeds/contacts/user%40example.com/full/1234567890"
\},
\{
"rel": "edit",
"type": "application/atom+xml",
"href": "https://www.google.com/m8/feeds/contacts/user%40example.com/full/1234567890"
\}
],
"xmlns": "http://www.w3.org/2005/Atom",
"xmlns:batch": "http://schemas.google.com/gdata/batch",
"xmlns:gd": "http://schemas.google.com/g/2005",
"xmlns:gContact": "http://schemas.google.com/contact/2008",
"gd:etag": "\"Q3c5eDVSLyt7I2A9XR5VFk0KRgI.\""
}
}
Create user
Creates a user. Sample Input
{
"access_token": "ya29.a0AfH6SMBgkVUp-lAa8Xc3jOoT5_jYcWGwZuoKn1234567890abcdefg",
"name": \{
"given_name": "John",
"family_name": "Doe"
\},
"password": "SecureP@ssw0rd123!",
"primary_email": "john.doe@example.com",
"suspended": false,
"change_password_at_next_login": true,
"org_unit_path": "/",
"include_in_global_address_list": true,
"phones": [
\{
"type": "work",
"value": "+1 555-123-4567",
"primary": true
\},
\{
"type": "mobile",
"value": "+1 555-987-6543"
\}
],
"addresses": [
\{
"type": "work",
"street_address": "123 Main St",
"locality": "Anytown",
"region": "CA",
"postal_code": "12345",
"country": "United States",
"primary": true
\}
]
}
Sample Output
Delete group
Deletes a group. Sample Input
\{
"access_token": "ya29.a0AfH6SMBnXcGLt7OzJ9VojsZHkjYZs1wJn2qmL3Yl6_1X2Y3Z4",
"group_key": "engineering@example.com"
\}
Sample Output
\{
"deleted": true,
"found": true
\}
Delete group membership
Removes a member from a group. Sample Input
\{
"access_token": "ya29.a0AfH6SMBnXjbcL9K3J_5tR8VxT7Y-Xj2Z...",
"group_key": "developers@example.com",
"member_key": "john.doe@example.com"
\}
Sample Output
\{
"deleted": true,
"found": true
\}
Delete organisational unit
Deletes an organizational unit. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXjYc7ZKlBpLz-jdhkJ3KLVNXQmKtReUzDX9bJwOD3SYF4KmGzHKr8RfY",
"customer": "C01a2b3c4",
"org_unit_path": "/Marketing/Social Media"
\}
Sample Output
{
"deleted": true
}
Delete role
Deletes a role. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXjKt7KlZ2Z3J4k5L6M7N8O9P0Q1R2S3T4U5V6W7X8Y9Z0",
"customer": "C01234567",
"role_id": "R98765432"
\}
Sample Output
\{
"deleted": true,
"found": true
\}
Delete shared contact
Delete shared contact using their ID Sample Input Sample Output
Delete user
Deletes a user. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgQjHkJ7z9XkR_1vY-3f8tGj2Zt5K...",
"user_key": "john.doe@example.com"
\}
Sample Output
\{
"deleted": true,
"found": true
\}
Get application
Get application by ID Sample Input Sample Output
Get custom schema
Retrieve schema. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXjKl2VzNPYz3_KPHj8KLY-1234567890abcdefghijklmnop",
"customer": "C01234567",
"schema_key": "Employee_Info"
\}
Sample Output
Get data transfer
Get data transfer by ID Sample Input
\{
"access_token": "ya29.a0AfH6SMBgkVYhDx8K9J_lYm3XzG8YvZ7K-1qLjH2f3Q5tXzY",
"transfer_id": "DT1234567890"
\}
Sample Output
{
"transfer_found": true,
"body": {
"kind": "admin#datatransfer#DataTransfer",
"etag": "\"MzM0MjQ5MjAwMA\"",
"id": "DT1234567890",
"name": "Calendar Transfer",
"transferParams": [
\{
"key": "CALENDAR_TRANSFER",
"value": [
"true"
]
\},
\{
"key": "OLD_OWNER_EMAIL",
"value": [
"olduser@example.com"
]
\},
\{
"key": "NEW_OWNER_EMAIL",
"value": [
"newuser@example.com"
]
\}
]
}
}
Get group
Retrieves a group. Sample Input Sample Output
{
"group_found": true,
"body": \{
"kind": "admin#directory#group",
"id": "03abcdef1234567890",
"etag": "\"abcdefghijklmnop\"",
"email": "developers@example.com",
"name": "Developers",
"directMembersCount": "15",
"description": "Group for all developers in the company",
"adminCreated": "true",
"aliases": [
"dev@example.com",
"coders@example.com"
],
"nonEditableAliases": [
"developers@example.com.test-google-a.com"
]
\}
}
Get group member
Retrieves a group member's properties. Sample Input
\{
"access_token": "ya29.a0AWY7CkmhU8j_Xn2jK3lG5fhZtR1234567890abcdefghijklmnop",
"group_key": "developers@example.com",
"member_key": "john.doe@example.com"
\}
Sample Output
{
"member_found": true,
"body": \{
"kind": "admin#directory#member",
"etag": "\"abcdefghijklmnop\"",
"id": "123456789012345678901",
"email": "john.doe@example.com",
"role": "MEMBER",
"type": "USER",
"status": "ACTIVE",
"delivery_settings": "ALL_MAIL"
\}
}
Get organisational unit
Retrieves an organizational unit. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgVmOu3X9zJ0Q1K-7vhX8JZ5Y...",
"customer": "C01234567",
"org_unit_path": "/Engineering"
\}
Sample Output
\{
"kind": "admin#directory#orgUnit",
"etag": "\"abcdefghijklmnop\"",
"name": "Engineering",
"description": "Engineering department",
"orgUnitPath": "/Engineering",
"orgUnitId": "id:OU_123456789",
"parentOrgUnitPath": "/",
"parentOrgUnitId": "id:OU_ROOT",
"blockInheritance": false
\}
Get role
Retrieves a role. Sample Input Sample Output
{
"kind": "admin#directory#role",
"etag": "\"abcdefghijklmnop\"",
"items": [
{
"kind": "admin#directory#role",
"etag": "\"qrstuvwxyz123456\"",
"roleId": 123456789,
"roleName": "Custom Admin",
"roleDescription": "Custom administrator role with specific privileges",
"rolePrivileges": [
\{
"privilegeName": "MANAGE_USERS",
"serviceId": "00haapbaf5123456"
\},
\{
"privilegeName": "MANAGE_GROUPS",
"serviceId": "00haapbaf5789012"
\}
],
"isSystemRole": false,
"isSuperAdminRole": false
}
],
"nextPageToken": null
}
Get schema
Retrieve schema. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXhYZ1K2J3m4N5qW6rLxJ8fG7H9iK0lMnOpQrTzX1vCdN2bR3cF8e9U",
"customer": "C01abc123",
"schema_key": "Employee_Information"
\}
Sample Output
{
"schema_found": true,
"body": {
"kind": "admin#directory#schema",
"schemaId": "S01def456",
"etag": "\"abcdefghijklmnop\"",
"schemaName": "Employee_Information",
"displayName": "Employee Information",
"fields": [
\{
"kind": "admin#directory#schema#fieldspec",
"fieldId": "F01ghi789",
"etag": "\"qrstuvwxyz123456\"",
"fieldType": "STRING",
"fieldName": "department",
"displayName": "Department",
"multiValued": false,
"readAccessType": "ALL_DOMAIN_USERS",
"indexed": true
\},
{
"kind": "admin#directory#schema#fieldspec",
"fieldId": "F02jkl012",
"etag": "\"789abcdefghijklm\"",
"fieldType": "DOUBLE",
"fieldName": "yearsOfService",
"displayName": "Years of Service",
"multiValued": false,
"readAccessType": "ADMINS_AND_SELF",
"indexed": true,
"numericIndexingSpec": \{
"minValue": 0,
"maxValue": 50
\}
}
]
}
}
Get shared contact
Retrieve a shared contact using their ID Sample Input
\{
"access_token": "ya29.a0AWY7CkmM8_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"user_email": "john.doe@example.com",
"contact_id": "http://www.google.com/m8/feeds/contacts/john.doe%40example.com/base/1234567890abcdef"
\}
Sample Output
{
"entry": {
"id": "http://www.google.com/m8/feeds/contacts/john.doe%40example.com/base/1234567890abcdef",
"updated": "2023-05-15T10:30:45.123Z",
"app:edited": \{
"value": "2023-05-15T10:30:45.123Z",
"xmlns:app": "http://www.w3.org/2007/app"
\},
"category": \{
"scheme": "http://schemas.google.com/g/2005#kind",
"term": "http://schemas.google.com/contact/2008#contact"
\},
"title": "Jane Smith",
"link": [
\{
"rel": "self",
"type": "application/atom+xml",
"href": "https://www.google.com/m8/feeds/contacts/john.doe%40example.com/full/1234567890abcdef"
\},
\{
"rel": "edit",
"type": "application/atom+xml",
"href": "https://www.google.com/m8/feeds/contacts/john.doe%40example.com/full/1234567890abcdef"
\}
],
"xmlns": "http://www.w3.org/2005/Atom",
"xmlns:batch": "http://schemas.google.com/gdata/batch",
"xmlns:gd": "http://schemas.google.com/g/2005",
"xmlns:gContact": "http://schemas.google.com/contact/2008",
"gd:etag": "\"QXc7cDVSLyt7I2A9XRdWFEUDRQc.\""
}
}
Get user
Retrieves a user. Sample Input Sample Output
{
"user_found": true,
"body": {
"kind": "admin#directory#user",
"id": "123456789012345678901",
"etag": "\"abcdefghijklmnop\"",
"primaryEmail": "john.doe@example.com",
"name": \{
"givenName": "John",
"familyName": "Doe",
"fullName": "John Doe"
\},
"isAdmin": false,
"isDelegatedAdmin": false,
"lastLoginTime": "2023-04-15T10:30:45.000Z",
"creationTime": "2022-01-01T09:00:00.000Z",
"agreedToTerms": true,
"suspended": false,
"archived": false,
"changePasswordAtNextLogin": false,
"ipWhitelisted": false,
"aliases": [
"j.doe@example.com",
"john@example.com"
],
"nonEditableAliases": [
"john.doe@example.com.test-google-a.com"
],
"customerId": "C01abc123",
"orgUnitPath": "/Users",
"isMailboxSetup": true,
"isEnrolledIn2Sv": true,
"isEnforcedIn2Sv": true,
"includeInGlobalAddressList": true,
"thumbnailPhotoUrl": "https://www.example.com/photos/ABCDEFG123456",
"thumbnailPhotoEtag": "\"HIJKLMNOP987654\""
}
}
List applications
Lists the applications available for data transfer for a customer. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXhYZ1xJ2m3K8fG_5tLZK9JzL...",
"customer": "C01234567",
"max_results": 50,
"page_token": "nextPageToken123"
\}
Sample Output
{
"kind": "admin#datatransfer#applicationsList",
"etag": "\"MzM0MjE5NDEwODc=\"",
"applications": [
{
"kind": "admin#datatransfer#applicationData",
"etag": "\"MzM0MjE5NDEwODc=\"",
"id": "55656082996",
"name": "Google Drive and Docs",
"transferParams": [
\{
"key": "DRIVE_EXPORT_FORMAT",
"value": [
"GOOGLE_APPS",
"MICROSOFT_APPS"
]
\},
\{
"key": "SHARED_DRIVES",
"value": [
"true",
"false"
]
\}
]
},
{
"kind": "admin#datatransfer#applicationData",
"etag": "\"MzM0MjE5NDEwODc=\"",
"id": "55656082999",
"name": "Google Calendar",
"transferParams": [
\{
"key": "CALENDAR_EXPORT_FORMAT",
"value": [
"ICS",
"CSV"
]
\}
]
}
]
}
List custom schemas
Retrieve all schemas for a customer. Sample Input Sample Output
List data transfers
Lists the transfers for a customer by source user, destination user, or status. Sample Input Sample Output
List group members
Retrieves a paginated list of all members in a group. Sample Input Sample Output
List groups
Retrieve all groups of a domain or of a user given a userKey (paginated). Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXhKSZFgdfgRGdTNYZjbvZXRzYWNhY2FjYWNhY2FjYWNhYw",
"domain": "example.com",
"max_results": 100,
"view_type": "admin_view",
"order_by": "email",
"sort_order": "ASCENDING"
\}
Sample Output
{
"kind": "admin#directory#groups",
"etag": "\"abcdefghijklmnop\"",
"groups": [
\{
"kind": "admin#directory#group",
"id": "01234567890abcdef",
"etag": "\"qrstuvwxyz123456\"",
"email": "engineering@example.com",
"name": "Engineering Team",
"directMembersCount": "25",
"description": "Group for all engineering team members",
"adminCreated": "true",
"aliases": [
"eng@example.com",
"developers@example.com"
],
"nonEditableAliases": [
"engineering@example.com.test-google-a.com"
]
\},
\{
"kind": "admin#directory#group",
"id": "98765432109876543",
"etag": "\"zyxwvutsrqponmlk\"",
"email": "marketing@example.com",
"name": "Marketing Team",
"directMembersCount": "15",
"description": "Group for all marketing team members",
"adminCreated": "true",
"aliases": [
"mkt@example.com"
],
"nonEditableAliases": [
"marketing@example.com.test-google-a.com"
]
\}
],
"nextPageToken": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
List organisational units
Retrieves a list of all organizational units for an account. Sample Input Sample Output
{
"kind": "admin#directory#orgUnits",
"etag": "\"abcdefghijklmnop\"",
"organizationUnits": [
\{
"kind": "admin#directory#orgUnit",
"etag": "\"qrstuvwxyz123456\"",
"name": "Root",
"description": "Root organizational unit",
"orgUnitPath": "/",
"orgUnitId": "id:123456789",
"parentOrgUnitPath": null,
"parentOrgUnitId": null,
"blockInheritance": false
\},
\{
"kind": "admin#directory#orgUnit",
"etag": "\"789abcdefghijklm\"",
"name": "Sales",
"description": "Sales department",
"orgUnitPath": "/Sales",
"orgUnitId": "id:987654321",
"parentOrgUnitPath": "/",
"parentOrgUnitId": "id:123456789",
"blockInheritance": false
\},
\{
"kind": "admin#directory#orgUnit",
"etag": "\"nopqrstuvwxyz012\"",
"name": "Engineering",
"description": "Engineering department",
"orgUnitPath": "/Engineering",
"orgUnitId": "id:456789123",
"parentOrgUnitPath": "/",
"parentOrgUnitId": "id:123456789",
"blockInheritance": true
\}
]
}
List roles
Retrieves a paginated list of all the roles in a domain. Sample Input Sample Output
{
"kind": "admin#directory#rolesList",
"etag": "\"abcdefghijklmnop\"",
"items": [
{
"kind": "admin#directory#role",
"etag": "\"qrstuvwxyz123456\"",
"roleId": 1234567890,
"roleName": "IT Administrator",
"roleDescription": "Manages IT resources and user accounts",
"rolePrivileges": [
\{
"privilegeName": "MANAGE_DEVICES",
"serviceId": "00haapyml5qzdub"
\},
\{
"privilegeName": "MANAGE_USERS",
"serviceId": "00haapyml5qzdub"
\}
],
"isSystemRole": false,
"isSuperAdminRole": false
},
{
"kind": "admin#directory#role",
"etag": "\"789012abcdefghij\"",
"roleId": 9876543210,
"roleName": "HR Manager",
"roleDescription": "Manages employee information and HR processes",
"rolePrivileges": [
\{
"privilegeName": "MANAGE_USERS",
"serviceId": "00haapyml5qzdub"
\},
\{
"privilegeName": "VIEW_AUDIT_REPORTS",
"serviceId": "00haapyml5qzdub"
\}
],
"isSystemRole": false,
"isSuperAdminRole": false
}
],
"nextPageToken": "nextPageToken456"
}
List shared contacts
Retrieve all of a user's contacts Sample Input
\{
"access_token": "ya29.a0AWY7CklhO1Tn-Uy1xJzV8JqwZpH9KZ3m2X9rT6Vj5nQ7cFgYzLxR3vGJ8bCxNzM",
"user_email": "john.doe@example.com",
"updated_since": "2023-05-01T00:00:00Z",
"show_deleted": false,
"sort_order": "ascending",
"offset": 0,
"limit": 25
\}
Sample Output
{
"contacts": [
{
"id": "http://www.google.com/m8/feeds/contacts/john.doe%40example.com/base/1234567890",
"updated": "2023-05-15T10:30:00.000Z",
"app:edited": \{
"value": "2023-05-15T10:30:00.000Z",
"xmlns:app": "http://www.w3.org/2007/app"
\},
"category": \{
"scheme": "http://schemas.google.com/g/2005#kind",
"term": "http://schemas.google.com/contact/2008#contact"
\},
"title": "Jane Smith",
"link": [
\{
"rel": "self",
"type": "application/atom+xml",
"href": "https://www.google.com/m8/feeds/contacts/john.doe%40example.com/full/1234567890",
"gd:etag": "\"QXc7cDVSLyt7I2A9XRdWFEUDRQU.\""
\},
\{
"rel": "edit",
"type": "application/atom+xml",
"href": "https://www.google.com/m8/feeds/contacts/john.doe%40example.com/full/1234567890",
"gd:etag": "\"QXc7cDVSLyt7I2A9XRdWFEUDRQU.\""
\}
]
}
],
"pagination": \{
"startIndex": 1,
"itemsPerPage": null,
"totalResults": 1
\}
}
List users
Retrieves a paginated list of either deleted users or all users in a domain. Sample Input Sample Output
Update group
Updates a group. Fields that are not present in the request will be preserved, and fields set to null will be cleared. Sample Input Sample Output
\{
"kind": "admin#directory#group",
"id": "03nsf8g2jdnsfkj23",
"etag": "\"ahJ3OHg63hdkel20dh\"",
"email": "dev-team@example.com",
"name": "Development Team",
"directMembersCount": "15",
"description": "This group is for all developers working on our main product. Use this group for technical discussions, code reviews, and project updates.",
"adminCreated": "true",
"aliases": [
"developers@example.com",
"engineering@example.com"
],
"nonEditableAliases": [
"dev-team@example.com"
]
\}
Update group membership
Updates the membership properties of a user in the specified group. Fields that are not present in the request will be preserved, and fields set to null will be cleared. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgXhKbLzNQDh-YQzjJFUa1234567890abcdefghijklmnop",
"group_key": "developers@example.com",
"member_key": "john.doe@example.com",
"email": "john.doe@example.com",
"delivery_settings": "DIGEST",
"role": "MEMBER"
\}
Sample Output
Update organisational unit
Updates an organizational unit. Fields that are not present in the request will be preserved, and fields set to null will be cleared. Sample Input
\{
"access_token": "ya29.a0AfH6SMBgQjGkJLzk9Ej-vXHZwHbLOv3jS4Kf7VnGZ3Hl8qYzUGv_Xj8",
"customer": "C01234567",
"org_unit_path": "/Sales/North_America",
"name": "North_America",
"block_inheritance": false,
"description": "Sales team for North America region",
"parent_org_unit_path": "/Sales"
\}
Sample Output
\{
"kind": "admin#directory#orgUnit",
"etag": "\"abcdefghijklmnop\"",
"name": "North_America",
"description": "Sales team for North America region",
"orgUnitPath": "/Sales/North_America",
"orgUnitId": "id:NA_Sales_123",
"parentOrgUnitPath": "/Sales",
"parentOrgUnitId": "id:Sales_456",
"blockInheritance": false
\}
Update schema
Updates a schema. Fields that are not present in the request will be preserved, and fields set to null will be cleared. Sample Input
{
"access_token": "ya29.a0AfH6SMBnXcGLtzqtXrJgHYeXF5XzOPxzK1Oj9Ht7V8pjQ",
"customer": "C03az79cb",
"schema_key": "Employee_Info",
"schema_name": "Employee Information",
"display_name": "Employee Details",
"fields": [
\{
"display_name": "Employee ID",
"field_name": "employee_id",
"field_type": "STRING",
"indexed": true,
"multi_valued": false,
"read_access_type": "ADMINS_AND_SELF"
\},
\{
"display_name": "Hire Date",
"field_name": "hire_date",
"field_type": "DATE",
"indexed": true,
"multi_valued": false,
"read_access_type": "ALL_DOMAIN_USERS"
\},
{
"display_name": "Salary",
"field_name": "salary",
"field_type": "DOUBLE",
"indexed": true,
"multi_valued": false,
"read_access_type": "ADMINS_AND_SELF",
"numeric_indexing_spec": \{
"min_value": 0,
"max_value": 1000000
\}
}
]
}
Sample Output
Update shared contact
Update shared shared contact Sample Input
{
"access_token": "ya29.a0AfH6SMBgkVWqS3k-MR9j3_fUq8Hq4Jy7...",
"user_email": "user@example.com",
"contact_id": "http://www.google.com/m8/feeds/contacts/user%40example.com/base/1234567890",
"name": \{
"given_name": "John",
"family_name": "Doe",
"full_name": "John Doe"
\},
"email": [
{
"attributes": \{
"address": "johndoe@example.com",
"rel": "http://schemas.google.com/g/2005#work",
"primary": true
\}
}
],
"phone_number": [
{
"attributes": {
"rel": "http://schemas.google.com/g/2005#mobile"
},
"text": "+1234567890"
}
],
"organization": [
{
"attributes": {
"rel": "http://schemas.google.com/g/2005#work"
},
"organization_name": "Acme Inc.",
"organization_title": "Software Engineer"
}
],
"atom_content": "Updated contact information"
}
Sample Output
Update user
Updates a user. Fields that are not present in the request will be preserved, and fields set to null will be cleared. Sample Input Sample Output
DDL operations
List organisational units (DDL)
Sample Input Sample Output
List roles (DDL)
Sample Input Sample Output
{
"roles": [
\{
"name": "roles/admin",
"title": "Admin",
"description": "Full access to all resources",
"etag": "ABC123"
\},
\{
"name": "roles/editor",
"title": "Editor",
"description": "Edit access to most resources",
"etag": "DEF456"
\},
\{
"name": "roles/viewer",
"title": "Viewer",
"description": "View access to most resources",
"etag": "GHI789"
\}
]
}