APIHub
Back to Explore

Admin SDK API

The Admin SDK API provides Google Workspace administrators with programmatic access to manage core directory resources—including customers, roles, buildings, organizational units, and both Chrome OS and mobile devices—supporting creation, retrieval, update (including patch), deletion, and actions such as moving devices, issuing commands, and deprovisioning.

Analytics
OAuth
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

239ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
PUT

/admin/directory/v1/customer/{customer}/roles/{roleId}

Updates a role.

  • customer (path, required) — Immutable ID of the Google Workspace account.
  • roleId (path, required) — Immutable ID of the role.
GET

/admin/directory/v1/customers/{customerKey}

Retrieves a customer.

  • customerKey (path, required) — Id of the customer to be retrieved
PUT

/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}

Updates a building.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • buildingId (path, required) — The id of the building to update.
  • coordinatesSource (query) — Source from which Building.coordinates are derived.
PATCH

/admin/directory/v1/customer/{customer}/roles/{roleId}

Patches a role.

  • customer (path, required) — Immutable ID of the Google Workspace account.
  • roleId (path, required) — Immutable ID of the role.
GET

/admin/directory/v1/customer/{customerId}/devices/chromeos

Retrieves a paginated list of Chrome OS devices within an account.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • includeChildOrgunits (query) — Return devices from all child orgunits, as well as the specified org unit. If this is set to true, 'orgUnitPath' must be provided.
  • maxResults (query, limit) — Maximum number of results to return.
  • orderBy (query) — Device property to use for sorting results.
  • orgUnitPath (query) — The full path of the organizational unit (minus the leading `/`) or its unique ID.
  • pageToken (query) — The `pageToken` query parameter is used to request the next page of query results. The follow-on request's `pageToken` query parameter is the `nextPageToken` from your previous response.
  • projection (query) — Restrict information returned to a set of selected fields.
  • query (query) — Search string in the format given at https://developers.google.com/admin-sdk/directory/v1/list-query-operators
  • sortOrder (query) — Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter.
POST

/admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu

Moves or inserts multiple Chrome OS devices to an organizational unit. You can move up to 50 devices at once.

  • customerId (path, required) — Immutable. ID of the Google Workspace account
  • orgUnitPath (query, required) — Full path of the target organizational unit or its ID
GET

/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}

Retrieves a Chrome OS device's properties.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • deviceId (path, required) — The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method.
  • projection (query) — Determines whether the response contains the full list of properties or only a subset.
PATCH

/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}

Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, `orgUnitPath`, or `annotatedAssetId`. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • deviceId (path, required) — The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method.
  • projection (query) — Restrict information returned to a set of selected fields.
PATCH

/admin/directory/v1/customers/{customerKey}

Patches a customer.

  • customerKey (path, required) — Id of the customer to be updated
PUT

/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}

Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, `orgUnitPath`, or `annotatedAssetId`.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • deviceId (path, required) — The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method.
  • projection (query) — Restrict information returned to a set of selected fields.
GET

/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}

Gets command data a specific command issued to the device.

  • customerId (path, required) — Immutable. ID of the Google Workspace account.
  • deviceId (path, required) — Immutable. ID of Chrome OS Device.
  • commandId (path, required) — Immutable. ID of Chrome OS Device Command.
POST

/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand

Issues a command for the device to execute.

  • customerId (path, required) — Immutable. ID of the Google Workspace account.
  • deviceId (path, required) — Immutable. ID of Chrome OS Device.
POST

/admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action

Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices. *Warning:* * Deprovisioning a device will stop device policy syncing and remove device-level printers. After a device is deprovisioned, it must be wiped before it can be re-enrolled. * Lost or stolen devices should use the disable action. * Re-enabling a disabled device will consume a device license. If you do not have sufficient licenses available when completing the re-enable action, you will receive an error. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • resourceId (path, required) — The unique ID of the device. The `resourceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method.
GET

/admin/directory/v1/customer/{customerId}/devices/mobile

Retrieves a paginated list of all user-owned mobile devices for an account. To retrieve a list that includes company-owned devices, use the Cloud Identity [Devices API](https://cloud.google.com/identity/docs/concepts/overview-devices) instead. This method times out after 60 minutes. For more information, see [Troubleshoot error codes](https://developers.google.com/admin-sdk/directory/v1/guides/troubleshoot-error-codes).

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • maxResults (query, limit) — Maximum number of results to return. Max allowed value is 100.
  • orderBy (query) — Device property to use for sorting results.
  • pageToken (query) — Token to specify next page in the list
  • projection (query) — Restrict information returned to a set of selected fields.
  • query (query) — Search string in the format given at https://developers.google.com/admin-sdk/directory/v1/search-operators
  • sortOrder (query) — Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter.
DELETE

/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}

Removes a mobile device.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • resourceId (path, required) — The unique ID the API service uses to identify the mobile device.
GET

/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}

Retrieves a mobile device's properties.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • resourceId (path, required) — The unique ID the API service uses to identify the mobile device.
  • projection (query) — Restrict information returned to a set of selected fields.
POST

/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action

Takes an action that affects a mobile device. For example, remotely wiping a device.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • resourceId (path, required) — The unique ID the API service uses to identify the mobile device.
GET

/admin/directory/v1/customer/{customerId}/orgunits

Retrieves a list of all organizational units for an account.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • orgUnitPath (query) — The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit.
  • type (query) — Whether to return all sub-organizations or just immediate children.
POST

/admin/directory/v1/customer/{customerId}/orgunits

Adds an organizational unit.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
DELETE

/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}

Removes an organizational unit.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • orgUnitPath (path, required) — The full path of the organizational unit (minus the leading `/`) or its unique ID.
GET

/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}

Retrieves an organizational unit.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • orgUnitPath (path, required) — The full path of the organizational unit (minus the leading `/`) or its unique ID.
PATCH

/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}

Updates an organizational unit. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch)

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • orgUnitPath (path, required) — The full path of the organizational unit (minus the leading `/`) or its unique ID.
PUT

/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}

Updates an organizational unit.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).
  • orgUnitPath (path, required) — The full path of the organizational unit (minus the leading `/`) or its unique ID.
GET

/admin/directory/v1/customer/{customerId}/schemas

Retrieves all schemas for a customer.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
POST

/admin/directory/v1/customer/{customerId}/schemas

Creates a schema.

  • customerId (path, required) — Immutable ID of the Google Workspace account.
DELETE

/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}

Deletes a schema.

  • customerId (path, required) — Immutable ID of the Google Workspace account.
  • schemaKey (path, required) — Name or immutable ID of the schema.
GET

/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}

Retrieves a schema.

  • customerId (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • schemaKey (path, required) — Name or immutable ID of the schema.
PATCH

/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}

Patches a schema.

  • customerId (path, required) — Immutable ID of the Google Workspace account.
  • schemaKey (path, required) — Name or immutable ID of the schema.
PUT

/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}

Updates a schema.

  • customerId (path, required) — Immutable ID of the Google Workspace account.
  • schemaKey (path, required) — Name or immutable ID of the schema.
PUT

/admin/directory/v1/customers/{customerKey}

Updates a customer.

  • customerKey (path, required) — Id of the customer to be updated
GET

/admin/directory/v1/customer/{customer}/domainaliases

Lists the domain aliases of the customer.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • parentDomainName (query) — Name of the parent domain for which domain aliases are to be fetched.
POST

/admin/directory/v1/customer/{customer}/domainaliases

Inserts a domain alias of the customer.

  • customer (path, required) — Immutable ID of the Google Workspace account.
DELETE

/admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}

Deletes a domain Alias of the customer.

  • customer (path, required) — Immutable ID of the Google Workspace account.
  • domainAliasName (path, required) — Name of domain alias to be retrieved.
GET

/admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}

Retrieves a domain alias of the customer.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • domainAliasName (path, required) — Name of domain alias to be retrieved.
GET

/admin/directory/v1/customer/{customer}/domains

Lists the domains of the customer.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
POST

/admin/directory/v1/customer/{customer}/domains

Inserts a domain of the customer.

  • customer (path, required) — Immutable ID of the Google Workspace account.
DELETE

/admin/directory/v1/customer/{customer}/domains/{domainName}

Deletes a domain of the customer.

  • customer (path, required) — Immutable ID of the Google Workspace account.
  • domainName (path, required) — Name of domain to be deleted
GET

/admin/directory/v1/customer/{customer}/domains/{domainName}

Retrieves a domain of the customer.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • domainName (path, required) — Name of domain to be retrieved
GET

/admin/directory/v1/customer/{customer}/resources/buildings

Retrieves a list of buildings for an account.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • maxResults (query, limit) — Maximum number of results to return.
  • pageToken (query) — Token to specify the next page in the list.
POST

/admin/directory/v1/customer/{customer}/resources/buildings

Inserts a building.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • coordinatesSource (query) — Source from which Building.coordinates are derived.
DELETE

/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}

Deletes a building.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • buildingId (path, required) — The id of the building to delete.
GET

/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}

Retrieves a building.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • buildingId (path, required) — The unique ID of the building to retrieve.
PATCH

/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}

Patches a building.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • buildingId (path, required) — The id of the building to update.
  • coordinatesSource (query) — Source from which Building.coordinates are derived.
GET

/admin/directory/v1/customer/{customer}/resources/calendars

Retrieves a list of calendar resources for an account.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • maxResults (query, limit) — Maximum number of results to return.
  • orderBy (query) — Field(s) to sort results by in either ascending or descending order. Supported fields include `resourceId`, `resourceName`, `capacity`, `buildingId`, and `floorName`. If no order is specified, defaults to ascending. Should be of the form "field [asc|desc], field [asc|desc], ...". For example `buildingId, capacity desc` would return results sorted first by `buildingId` in ascending order then by `capacity` in descending order.
  • pageToken (query) — Token to specify the next page in the list.
  • query (query) — String query used to filter results. Should be of the form "field operator value" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match, '!=' for mismatch and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Logical operators NOT and AND are supported (in this order of precedence). Supported fields include `generatedResourceName`, `name`, `buildingId`, `floor_name`, `capacity`, `featureInstances.feature.name`, `resourceEmail`, `resourceCategory`. For example `buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone`.
POST

/admin/directory/v1/customer/{customer}/resources/calendars

Inserts a calendar resource.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
DELETE

/admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}

Deletes a calendar resource.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • calendarResourceId (path, required) — The unique ID of the calendar resource to delete.
GET

/admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}

Retrieves a calendar resource.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • calendarResourceId (path, required) — The unique ID of the calendar resource to retrieve.
PATCH

/admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}

Patches a calendar resource.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • calendarResourceId (path, required) — The unique ID of the calendar resource to update.
PUT

/admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}

Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • calendarResourceId (path, required) — The unique ID of the calendar resource to update.
GET

/admin/directory/v1/customer/{customer}/resources/features

Retrieves a list of features for an account.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • maxResults (query, limit) — Maximum number of results to return.
  • pageToken (query) — Token to specify the next page in the list.
POST

/admin/directory/v1/customer/{customer}/resources/features

Inserts a feature.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
DELETE

/admin/directory/v1/customer/{customer}/resources/features/{featureKey}

Deletes a feature.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • featureKey (path, required) — The unique ID of the feature to delete.
GET

/admin/directory/v1/customer/{customer}/resources/features/{featureKey}

Retrieves a feature.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • featureKey (path, required) — The unique ID of the feature to retrieve.
PATCH

/admin/directory/v1/customer/{customer}/resources/features/{featureKey}

Patches a feature.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • featureKey (path, required) — The unique ID of the feature to update.
PUT

/admin/directory/v1/customer/{customer}/resources/features/{featureKey}

Updates a feature.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • featureKey (path, required) — The unique ID of the feature to update.
POST

/admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename

Renames a feature.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.
  • oldName (path, required) — The unique ID of the feature to rename.
GET

/admin/directory/v1/customer/{customer}/roleassignments

Retrieves a paginated list of all roleAssignments.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • includeIndirectRoleAssignments (query) — When set to `true`, fetches indirect role assignments (i.e. role assignment via a group) as well as direct ones. Defaults to `false`. You must specify `user_key` or the indirect role assignments will not be included.
  • maxResults (query, limit) — Maximum number of results to return.
  • pageToken (query) — Token to specify the next page in the list.
  • roleId (query) — Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.
  • userKey (query) — The primary email address, alias email address, or unique user or group ID. If included in the request, returns role assignments only for this user or group.
POST

/admin/directory/v1/customer/{customer}/roleassignments

Creates a role assignment.

  • customer (path, required) — Immutable ID of the Google Workspace account.
DELETE

/admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}

Deletes a role assignment.

  • customer (path, required) — Immutable ID of the Google Workspace account.
  • roleAssignmentId (path, required) — Immutable ID of the role assignment.
GET

/admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}

Retrieves a role assignment.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • roleAssignmentId (path, required) — Immutable ID of the role assignment.
GET

/admin/directory/v1/customer/{customer}/roles

Retrieves a paginated list of all the roles in a domain.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • maxResults (query, limit) — Maximum number of results to return.
  • pageToken (query) — Token to specify the next page in the list.
POST

/admin/directory/v1/customer/{customer}/roles

Creates a role.

  • customer (path, required) — Immutable ID of the Google Workspace account.
GET

/admin/directory/v1/customer/{customer}/roles/ALL/privileges

Retrieves a paginated list of all privileges for a customer.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
DELETE

/admin/directory/v1/customer/{customer}/roles/{roleId}

Deletes a role.

  • customer (path, required) — Immutable ID of the Google Workspace account.
  • roleId (path, required) — Immutable ID of the role.
GET

/admin/directory/v1/customer/{customer}/roles/{roleId}

Retrieves a role.

  • customer (path, required) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • roleId (path, required) — Immutable ID of the role.
GET

/admin/directory/v1/groups

Retrieves all groups of a domain or of a user given a userKey (paginated).

  • customer (query) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • domain (query) — The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the `customer` query parameter instead.
  • maxResults (query, limit) — Maximum number of results to return. Max allowed value is 200.
  • orderBy (query) — Column to use for sorting results
  • pageToken (query) — Token to specify next page in the list
  • query (query) — Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-groups
  • sortOrder (query) — Whether to return results in ascending or descending order. Only of use when orderBy is also used
  • userKey (query) — Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.
POST

/admin/directory/v1/groups

Creates a group.

DELETE

/admin/directory/v1/groups/{groupKey}

Deletes a group.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
GET

/admin/directory/v1/groups/{groupKey}

Retrieves a group's properties.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
PATCH

/admin/directory/v1/groups/{groupKey}

Updates a group's properties. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
PUT

/admin/directory/v1/groups/{groupKey}

Updates a group's properties.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
GET

/admin/directory/v1/groups/{groupKey}/aliases

Lists all aliases for a group.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
POST

/admin/directory/v1/groups/{groupKey}/aliases

Adds an alias for the group.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
DELETE

/admin/directory/v1/groups/{groupKey}/aliases/{alias}

Removes an alias.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
  • alias (path, required) — The alias to be removed
GET

/admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}

Checks whether the given user is a member of the group. Membership can be direct or nested, but if nested, the `memberKey` and `groupKey` must be entities in the same domain or an `Invalid input` error is returned. To check for nested memberships that include entities outside of the group's domain, use the [`checkTransitiveMembership()`](https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/checkTransitiveMembership) method in the Cloud Identity Groups API.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
  • memberKey (path, required) — Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.
GET

/admin/directory/v1/groups/{groupKey}/members

Retrieves a paginated list of all members in a group. This method times out after 60 minutes. For more information, see [Troubleshoot error codes](https://developers.google.com/admin-sdk/directory/v1/guides/troubleshoot-error-codes).

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
  • includeDerivedMembership (query) — Whether to list indirect memberships. Default: false.
  • maxResults (query, limit) — Maximum number of results to return. Max allowed value is 200.
  • pageToken (query) — Token to specify next page in the list.
  • roles (query) — The `roles` query parameter allows you to retrieve group members by role. Allowed values are `OWNER`, `MANAGER`, and `MEMBER`.
POST

/admin/directory/v1/groups/{groupKey}/members

Adds a user to the specified group.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
DELETE

/admin/directory/v1/groups/{groupKey}/members/{memberKey}

Removes a member from a group.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
  • memberKey (path, required) — Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.
GET

/admin/directory/v1/groups/{groupKey}/members/{memberKey}

Retrieves a group member's properties.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
  • memberKey (path, required) — Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.
PATCH

/admin/directory/v1/groups/{groupKey}/members/{memberKey}

Updates the membership properties of a user in the specified group. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
  • memberKey (path, required) — Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.
PUT

/admin/directory/v1/groups/{groupKey}/members/{memberKey}

Updates the membership of a user in the specified group.

  • groupKey (path, required) — Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
  • memberKey (path, required) — Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.
GET

/admin/directory/v1/users

Retrieves a paginated list of either deleted users or all users in a domain.

  • customFieldMask (query) — A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.
  • customer (query) — The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
  • domain (query) — The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the `customer` query parameter instead. Either the `customer` or the `domain` parameter must be provided.
  • event (query) — Event on which subscription is intended (if subscribing)
  • maxResults (query, limit) — Maximum number of results to return.
  • orderBy (query) — Property to use for sorting results.
  • pageToken (query) — Token to specify next page in the list
  • projection (query) — What subset of fields to fetch for this user.
  • query (query) — Query string for searching user fields. For more information on constructing user queries, see [Search for Users](/admin-sdk/directory/v1/guides/search-users).
  • showDeleted (query) — If set to `true`, retrieves the list of deleted users. (Default: `false`)
  • sortOrder (query) — Whether to return results in ascending or descending order, ignoring case.
  • viewType (query) — Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).
POST

/admin/directory/v1/users

Creates a user.

POST

/admin/directory/v1/users/watch

Watches for changes in users list.

  • customFieldMask (query) — Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
  • customer (query) — Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.
  • domain (query) — Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead."
  • event (query) — Events to watch for.
  • maxResults (query, limit) — Maximum number of results to return.
  • orderBy (query) — Column to use for sorting results
  • pageToken (query) — Token to specify next page in the list
  • projection (query) — What subset of fields to fetch for this user.
  • query (query) — Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users
  • showDeleted (query) — If set to true, retrieves the list of deleted users. (Default: false)
  • sortOrder (query) — Whether to return results in ascending or descending order.
  • viewType (query) — Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).
DELETE

/admin/directory/v1/users/{userKey}

Deletes a user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
GET

/admin/directory/v1/users/{userKey}

Retrieves a user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • customFieldMask (query) — A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.
  • projection (query) — What subset of fields to fetch for this user.
  • viewType (query) — Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).
PATCH

/admin/directory/v1/users/{userKey}

Updates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance. If you're mapping an external identity to a Google identity, use the [`update`](https://developers.google.com/admin-sdk/directory/v1/reference/users/update) method instead of the `patch` method. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
PUT

/admin/directory/v1/users/{userKey}

Updates a user. This method supports patch semantics, meaning that you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to `null` will be cleared. For repeating fields that contain arrays, individual items in the array can't be patched piecemeal; they must be supplied in the request body with the desired values for all items. See the [user accounts guide](https://developers.google.com/admin-sdk/directory/v1/guides/manage-users#update_user) for more information.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
GET

/admin/directory/v1/users/{userKey}/aliases

Lists all aliases for a user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • event (query) — Events to watch for.
POST

/admin/directory/v1/users/{userKey}/aliases

Adds an alias.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
POST

/admin/directory/v1/users/{userKey}/aliases/watch

Watches for changes in users list.

  • userKey (path, required) — Email or immutable ID of the user
  • event (query) — Events to watch for.
DELETE

/admin/directory/v1/users/{userKey}/aliases/{alias}

Removes an alias.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • alias (path, required) — The alias to be removed.
GET

/admin/directory/v1/users/{userKey}/asps

Lists the ASPs issued by a user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
DELETE

/admin/directory/v1/users/{userKey}/asps/{codeId}

Deletes an ASP issued by a user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • codeId (path, required) — The unique ID of the ASP to be deleted.
GET

/admin/directory/v1/users/{userKey}/asps/{codeId}

Gets information about an ASP issued by a user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • codeId (path, required) — The unique ID of the ASP.
POST

/admin/directory/v1/users/{userKey}/makeAdmin

Makes a user a super administrator.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
DELETE

/admin/directory/v1/users/{userKey}/photos/thumbnail

Removes the user's photo.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
GET

/admin/directory/v1/users/{userKey}/photos/thumbnail

Retrieves the user's photo.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
PATCH

/admin/directory/v1/users/{userKey}/photos/thumbnail

Adds a photo for the user. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
PUT

/admin/directory/v1/users/{userKey}/photos/thumbnail

Adds a photo for the user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
POST

/admin/directory/v1/users/{userKey}/signOut

Signs a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again.

  • userKey (path, required) — Identifies the target user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
GET

/admin/directory/v1/users/{userKey}/tokens

Returns the set of tokens specified user has issued to 3rd party applications.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
DELETE

/admin/directory/v1/users/{userKey}/tokens/{clientId}

Deletes all access tokens issued by a user for an application.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • clientId (path, required) — The Client ID of the application the token is issued to.
GET

/admin/directory/v1/users/{userKey}/tokens/{clientId}

Gets information about an access token issued by a user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • clientId (path, required) — The Client ID of the application the token is issued to.
POST

/admin/directory/v1/users/{userKey}/twoStepVerification/turnOff

Turns off 2-Step Verification for user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
POST

/admin/directory/v1/users/{userKey}/undelete

Undeletes a deleted user.

  • userKey (path, required) — The immutable id of the user
GET

/admin/directory/v1/users/{userKey}/verificationCodes

Returns the current set of valid backup verification codes for the specified user.

  • userKey (path, required) — Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
POST

/admin/directory/v1/users/{userKey}/verificationCodes/generate

Generates new backup verification codes for the user.

  • userKey (path, required) — Email or immutable ID of the user
POST

/admin/directory/v1/users/{userKey}/verificationCodes/invalidate

Invalidates the current backup verification codes for the user.

  • userKey (path, required) — Email or immutable ID of the user
DELETE

/admin/directory/v1/{name}

Deletes a print server.

  • name (path, required) — Required. The name of the print server to be deleted. Format: `customers/{customer.id}/chrome/printServers/{print_server.id}`
GET

/admin/directory/v1/{name}

Returns a print server's configuration.

  • name (path, required) — Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`
PATCH

/admin/directory/v1/{name}

Updates a print server's configuration.

  • name (path, required) — Immutable. Resource name of the print server. Leave empty when creating. Format: `customers/{customer.id}/printServers/{print_server.id}`
  • updateMask (query) — The list of fields to update. Some fields are read-only and cannot be updated. Values for unspecified fields are patched.
GET

/admin/directory/v1/{parent}/chrome/printServers

Lists print server configurations.

  • parent (path, required) — Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`
  • filter (query) — Search query in [Common Expression Language syntax](https://github.com/google/cel-spec). Supported filters are `display_name`, `description`, and `uri`. Example: `printServer.displayName=='marketing-queue'`.
  • orderBy (query) — Sort order for results. Supported values are `display_name`, `description`, or `create_time`. Default order is ascending, but descending order can be returned by appending "desc" to the `order_by` field. For instance, `orderBy=='description desc'` returns the print servers sorted by description in descending order.
  • orgUnitId (query) — If `org_unit_id` is present in the request, only print servers owned or inherited by the organizational unit (OU) are returned. If the `PrintServer` resource's `org_unit_id` matches the one in the request, the OU owns the server. If `org_unit_id` is not specified in the request, all print servers are returned or filtered against.
  • pageSize (query, limit) — The maximum number of objects to return (default `100`, max `100`). The service might return fewer than this value.
  • pageToken (query) — A generated token to paginate results (the `next_page_token` from a previous call).
POST

/admin/directory/v1/{parent}/chrome/printServers

Creates a print server.

  • parent (path, required) — Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`
POST

/admin/directory/v1/{parent}/chrome/printServers:batchCreatePrintServers

Creates multiple print servers.

  • parent (path, required) — Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{id}`
POST

/admin/directory/v1/{parent}/chrome/printServers:batchDeletePrintServers

Deletes multiple print servers.

  • parent (path, required) — Required. The [unique ID](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers) of the customer's Google Workspace account. Format: `customers/{customer.id}`
GET

/admin/directory/v1/{parent}/chrome/printers

List printers configs.

  • parent (path, required) — Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}
  • filter (query) — Search query. Search syntax is shared between this api and Admin Console printers pages.
  • orderBy (query) — The order to sort results by. Must be one of display_name, description, make_and_model, or create_time. Default order is ascending, but descending order can be returned by appending "desc" to the order_by field. For instance, "description desc" will return the printers sorted by description in descending order.
  • orgUnitId (query) — Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id.
  • pageSize (query, limit) — The maximum number of objects to return. The service may return fewer than this value.
  • pageToken (query) — A page token, received from a previous call.
POST

/admin/directory/v1/{parent}/chrome/printers

Creates a printer under given Organization Unit.

  • parent (path, required) — Required. The name of the customer. Format: customers/{customer_id}
POST

/admin/directory/v1/{parent}/chrome/printers:batchCreatePrinters

Creates printers under given Organization Unit.

  • parent (path, required) — Required. The name of the customer. Format: customers/{customer_id}
POST

/admin/directory/v1/{parent}/chrome/printers:batchDeletePrinters

Deletes printers in batch.

  • parent (path, required) — Required. The name of the customer. Format: customers/{customer_id}
GET

/admin/directory/v1/{parent}/chrome/printers:listPrinterModels

Lists the supported printer models.

  • parent (path, required) — Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}
  • filter (query) — Filer to list only models by a given manufacturer in format: "manufacturer:Brother". Search syntax is shared between this api and Admin Console printers pages.
  • pageSize (query, limit) — The maximum number of objects to return. The service may return fewer than this value.
  • pageToken (query) — A page token, received from a previous call.
POST

/admin/directory_v1/channels/stop

Stops watching resources through this channel.

122 endpoints auto-detected

Authentication

This API requires authentication: OAuth.

curl -X PUT \
  "https://admin.googleapis.com/admin/directory/v1/customer/{customer}/roles/{roleId}"

admin.googleapis.com · HTTPS only