Skip to content

Admin SDK API API

by googleapis.com

OAuthHTTPSAnalytics
Open documentation ↗

Overview

Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.

Admin SDK API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 122 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Analytics
Base URL
https://admin.googleapis.com/
Version
directory_v1
Endpoints
122
Spec updated
2023-04-21

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://admin.googleapis.com/admin/directory/v1/groups" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://admin.googleapis.com/admin/directory/v1/groups", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://admin.googleapis.com/admin/directory/v1/groups",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/admin/directory/v1/customer/{customerId}/devices/chromeosRetrieves a paginated list of Chrome OS devices within an account.
POST/admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOuMoves or inserts multiple Chrome OS devices to an organizational unit. You can move up to 50 devices at once.
GET/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}Retrieves a Chrome OS device's properties.
PUT/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, `orgUnitPath`, or `annotatedAssetId`.
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 [patc
GET/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}Gets command data a specific command issued to the device.
POST/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommandIssues a command for the device to execute.
POST/admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/actionTakes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices. *Warning:* * Deprovisioning a device will sto
GET/admin/directory/v1/customer/{customerId}/devices/mobileRetrieves 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 [Devi
GET/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}Retrieves a mobile device's properties.
DELETE/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}Removes a mobile device.
POST/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/actionTakes an action that affects a mobile device. For example, remotely wiping a device.
GET/admin/directory/v1/customer/{customerId}/orgunitsRetrieves a list of all organizational units for an account.
POST/admin/directory/v1/customer/{customerId}/orgunitsAdds an organizational unit.
GET/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}Retrieves an organizational unit.
PUT/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}Updates an organizational unit.
PATCH/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}Updates an organizational unit. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch)
DELETE/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}Removes an organizational unit.
GET/admin/directory/v1/customer/{customerId}/schemasRetrieves all schemas for a customer.
POST/admin/directory/v1/customer/{customerId}/schemasCreates a schema.
GET/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}Retrieves a schema.
PUT/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}Updates a schema.
PATCH/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}Patches a schema.
DELETE/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}Deletes a schema.
GET/admin/directory/v1/customer/{customer}/domainaliasesLists the domain aliases of the customer.
POST/admin/directory/v1/customer/{customer}/domainaliasesInserts a domain alias of the customer.
GET/admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}Retrieves a domain alias of the customer.
DELETE/admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}Deletes a domain Alias of the customer.
GET/admin/directory/v1/customer/{customer}/domainsLists the domains of the customer.
POST/admin/directory/v1/customer/{customer}/domainsInserts a domain of the customer.
GET/admin/directory/v1/customer/{customer}/domains/{domainName}Retrieves a domain of the customer.
DELETE/admin/directory/v1/customer/{customer}/domains/{domainName}Deletes a domain of the customer.
GET/admin/directory/v1/customer/{customer}/resources/buildingsRetrieves a list of buildings for an account.
POST/admin/directory/v1/customer/{customer}/resources/buildingsInserts a building.
GET/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}Retrieves a building.
PUT/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}Updates a building.
PATCH/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}Patches a building.
DELETE/admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}Deletes a building.
GET/admin/directory/v1/customer/{customer}/resources/calendarsRetrieves a list of calendar resources for an account.
POST/admin/directory/v1/customer/{customer}/resources/calendarsInserts a calendar resource.
GET/admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}Retrieves a calendar resource.
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 i
PATCH/admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}Patches a calendar resource.
DELETE/admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}Deletes a calendar resource.
GET/admin/directory/v1/customer/{customer}/resources/featuresRetrieves a list of features for an account.
POST/admin/directory/v1/customer/{customer}/resources/featuresInserts a feature.
GET/admin/directory/v1/customer/{customer}/resources/features/{featureKey}Retrieves a feature.
PUT/admin/directory/v1/customer/{customer}/resources/features/{featureKey}Updates a feature.
PATCH/admin/directory/v1/customer/{customer}/resources/features/{featureKey}Patches a feature.
DELETE/admin/directory/v1/customer/{customer}/resources/features/{featureKey}Deletes a feature.
POST/admin/directory/v1/customer/{customer}/resources/features/{oldName}/renameRenames a feature.
GET/admin/directory/v1/customer/{customer}/roleassignmentsRetrieves a paginated list of all roleAssignments.
POST/admin/directory/v1/customer/{customer}/roleassignmentsCreates a role assignment.
GET/admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}Retrieves a role assignment.
DELETE/admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}Deletes a role assignment.
GET/admin/directory/v1/customer/{customer}/rolesRetrieves a paginated list of all the roles in a domain.
POST/admin/directory/v1/customer/{customer}/rolesCreates a role.
GET/admin/directory/v1/customer/{customer}/roles/ALL/privilegesRetrieves a paginated list of all privileges for a customer.
GET/admin/directory/v1/customer/{customer}/roles/{roleId}Retrieves a role.
PUT/admin/directory/v1/customer/{customer}/roles/{roleId}Updates a role.
PATCH/admin/directory/v1/customer/{customer}/roles/{roleId}Patches a role.
DELETE/admin/directory/v1/customer/{customer}/roles/{roleId}Deletes a role.
GET/admin/directory/v1/customers/{customerKey}Retrieves a customer.
PUT/admin/directory/v1/customers/{customerKey}Updates a customer.
PATCH/admin/directory/v1/customers/{customerKey}Patches a customer.
GET/admin/directory/v1/groupsRetrieves all groups of a domain or of a user given a userKey (paginated).
POST/admin/directory/v1/groupsCreates a group.
GET/admin/directory/v1/groups/{groupKey}Retrieves a group's properties.
PUT/admin/directory/v1/groups/{groupKey}Updates a group's properties.
PATCH/admin/directory/v1/groups/{groupKey}Updates a group's properties. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).
DELETE/admin/directory/v1/groups/{groupKey}Deletes a group.
GET/admin/directory/v1/groups/{groupKey}/aliasesLists all aliases for a group.
POST/admin/directory/v1/groups/{groupKey}/aliasesAdds an alias for the group.
DELETE/admin/directory/v1/groups/{groupKey}/aliases/{alias}Removes an alias.
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 th
GET/admin/directory/v1/groups/{groupKey}/membersRetrieves a paginated list of all members in a group. This method times out after 60 minutes. For more information, see [Troubleshoot error codes](https://devel
POST/admin/directory/v1/groups/{groupKey}/membersAdds a user to the specified group.
GET/admin/directory/v1/groups/{groupKey}/members/{memberKey}Retrieves a group member's properties.
PUT/admin/directory/v1/groups/{groupKey}/members/{memberKey}Updates the membership of a user in the specified group.
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).
DELETE/admin/directory/v1/groups/{groupKey}/members/{memberKey}Removes a member from a group.
GET/admin/directory/v1/usersRetrieves a paginated list of either deleted users or all users in a domain.
POST/admin/directory/v1/usersCreates a user.
POST/admin/directory/v1/users/watchWatches for changes in users list.
GET/admin/directory/v1/users/{userKey}Retrieves a user.
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 re
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 m
DELETE/admin/directory/v1/users/{userKey}Deletes a user.
GET/admin/directory/v1/users/{userKey}/aliasesLists all aliases for a user.
POST/admin/directory/v1/users/{userKey}/aliasesAdds an alias.
POST/admin/directory/v1/users/{userKey}/aliases/watchWatches for changes in users list.
DELETE/admin/directory/v1/users/{userKey}/aliases/{alias}Removes an alias.
GET/admin/directory/v1/users/{userKey}/aspsLists the ASPs issued by a user.
GET/admin/directory/v1/users/{userKey}/asps/{codeId}Gets information about an ASP issued by a user.
DELETE/admin/directory/v1/users/{userKey}/asps/{codeId}Deletes an ASP issued by a user.
POST/admin/directory/v1/users/{userKey}/makeAdminMakes a user a super administrator.
GET/admin/directory/v1/users/{userKey}/photos/thumbnailRetrieves the user's photo.
PUT/admin/directory/v1/users/{userKey}/photos/thumbnailAdds a photo for the user.
PATCH/admin/directory/v1/users/{userKey}/photos/thumbnailAdds a photo for the user. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).
DELETE/admin/directory/v1/users/{userKey}/photos/thumbnailRemoves the user's photo.

Showing the first 100 of 122 endpoints; the full list is in the documentation.

Questions

Does the Admin SDK API API need an API key?

Yes. The Admin SDK API API uses OAuth authentication; the documentation explains how to get credentials.

Does the Admin SDK API API support HTTPS?

Yes, the Admin SDK API API is served over HTTPS.

How many endpoints does the Admin SDK API API have?

Its OpenAPI description lists 122 endpoints in version directory_v1. The first 100 are shown on this page.

What are alternatives to the Admin SDK API API?

Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.

Compare alternatives →

Google Play Integrity API

Analytics

The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.

OAuth1 endpoints

versionhistory.googleapis.com API

Analytics

Version History API - Prod

No auth4 endpoints

Doc Converter

Analytics

This api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)

No auth1 endpoints

Perspective Comment Analyzer API

Analytics

The Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.

OAuth2 endpoints

Safe Browsing API

Analytics

Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.

No auth7 endpoints

Web Fonts Developer API

Analytics

The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.

No auth1 endpoints

Listed from APIs.guru (CC0).