Google Admin SDK Admin Sdk Admin Directory Customer API

The Admin Sdk Admin Directory Customer API from Google Admin SDK — 4 operation(s) for admin sdk admin directory customer.

GitHub OpenAPI

Operations 4

POST /admin/directory/v1/customer/{customerId}/devices/chromeos:batchChangeStatus Batch change status chromeos #
POST /admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand Issue command chromeos #
GET /admin/directory/v1/customer/{customerId}/devices/chromeos:countChromeOsDevices Count chrome os devices chromeos #
GET /admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId} Get commands #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-admin-sdk:google-admin-sdk-admin-directory-customer-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-admin-sdk-admin-directory-customer-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Admin SDK API Customer API
  version: directory_v1
  description: Generated from Google's published Discovery document for Admin SDK API (admin directory_v1, revision 20261109).
    4 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
externalDocs:
  url: https://developers.google.com/workspace/admin/
servers:
- url: https://admin.googleapis.com
paths:
  /admin/directory/v1/customer/{customerId}/devices/chromeos:batchChangeStatus:
    post:
      operationId: admin.customer.devices.chromeos.batchChangeStatus
      summary: Batch change status chromeos
      description: Changes the status of a batch of ChromeOS devices. For more information about changing a ChromeOS device
        state [Repair, repurpose, or retire ChromeOS devices](https://support.google.com/chrome/a/answer/3523633).
      parameters:
      - name: customerId
        in: path
        required: true
        description: Required. Immutable ID of the Google Workspace account.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchChangeChromeOsDeviceStatusRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchChangeChromeOsDeviceStatusResponse'
        4XX:
          content: &id001
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id001
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.device.chromeos
      - apiKey: []
      tags:
      - Customer
  /admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand:
    post:
      operationId: admin.customer.devices.chromeos.issueCommand
      summary: Issue command chromeos
      description: Issues a command for the device to execute.
      parameters:
      - name: customerId
        in: path
        required: true
        description: Immutable. ID of the Google Workspace account.
        schema:
          type: string
      - name: deviceId
        in: path
        required: true
        description: Immutable. ID of Chrome OS Device.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectoryChromeosdevicesIssueCommandRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryChromeosdevicesIssueCommandResponse'
        4XX:
          content: &id002
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id002
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.device.chromeos
      - apiKey: []
      tags:
      - Customer
  /admin/directory/v1/customer/{customerId}/devices/chromeos:countChromeOsDevices:
    get:
      operationId: admin.customer.devices.chromeos.countChromeOsDevices
      summary: Count chrome os devices chromeos
      description: Counts ChromeOS devices matching the request.
      parameters:
      - name: customerId
        in: path
        required: true
        description: Required. Immutable ID of the Google Workspace account.
        schema:
          type: string
      - name: filter
        in: query
        required: false
        description: Optional. Search string in the format given at [List query operators](https://developers.google.com/workspace/admin/directory/v1/list-query-operators).
        schema:
          type: string
      - name: includeChildOrgunits
        in: query
        required: false
        description: Optional. Return devices from all child orgunits, as well as the specified org unit. If this is set to
          true, 'orgUnitPath' must be provided.
        schema:
          type: boolean
      - name: orgUnitPath
        in: query
        required: false
        description: Optional. The full path of the organizational unit (minus the leading `/`) or its unique ID.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountChromeOsDevicesResponse'
        4XX:
          content: &id003
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id003
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.device.chromeos
        - https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly
      - apiKey: []
      tags:
      - Customer
  /admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}:
    get:
      operationId: admin.customer.devices.chromeos.commands.get
      summary: Get commands
      description: Gets command data a specific command issued to the device.
      parameters:
      - name: customerId
        in: path
        required: true
        description: Immutable. ID of the Google Workspace account.
        schema:
          type: string
      - name: deviceId
        in: path
        required: true
        description: Immutable. ID of Chrome OS Device.
        schema:
          type: string
      - name: commandId
        in: path
        required: true
        description: Immutable. ID of Chrome OS Device Command.
        schema:
          format: int64
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryChromeosdevicesCommand'
        4XX:
          content: &id004
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content: *id004
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/admin.directory.device.chromeos
        - https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly
      - apiKey: []
      tags:
      - Customer
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/admin.directory.userschema: View and manage the provisioning of user schemas on
              your domain
            https://www.googleapis.com/auth/admin.directory.group.readonly: View groups on your domain
            https://www.googleapis.com/auth/admin.directory.resource.calendar: View and manage the provisioning of calendar
              resources on your domain
            https://www.googleapis.com/auth/admin.directory.domain.readonly: View domains related to your customers
            https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly: View your ChromeOS devices' metadata
            https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly: View calendar resources on your domain
            https://www.googleapis.com/auth/admin.directory.device.mobile.readonly: View your mobile devices' metadata
            https://www.googleapis.com/auth/admin.chrome.printers.readonly: See the printers that your organization can use
              with Chrome
            https://www.googleapis.com/auth/admin.directory.user.alias.readonly: View user aliases on your domain
            https://www.googleapis.com/auth/admin.chrome.printers: See, add, edit, and permanently delete the printers that
              your organization can use with Chrome
            https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly: View delegated admin roles for your domain
            https://www.googleapis.com/auth/admin.directory.user: View and manage the provisioning of users on your domain
            https://www.googleapis.com/auth/admin.directory.group: View and manage the provisioning of groups on your domain
            https://www.googleapis.com/auth/admin.directory.user.readonly: See info about users on your domain
            https://www.googleapis.com/auth/admin.directory.rolemanagement: Manage delegated admin roles for your domain
            https://www.googleapis.com/auth/admin.directory.user.security: Manage data access permissions for users on your
              domain
            https://www.googleapis.com/auth/admin.directory.customer: View and manage customer related information
            https://www.googleapis.com/auth/admin.directory.userschema.readonly: View user schemas on your domain
            https://www.googleapis.com/auth/admin.directory.device.mobile.action: Manage your mobile devices by performing
              administrative tasks
            https://www.googleapis.com/auth/admin.directory.orgunit: View and manage organization units on your domain
            https://www.googleapis.com/auth/admin.directory.group.member: View and manage group subscriptions on your domain
            https://www.googleapis.com/auth/admin.directory.device.chromeos: View and manage your ChromeOS devices' metadata
            https://www.googleapis.com/auth/admin.directory.device.mobile: View and manage your mobile devices' metadata
            https://www.googleapis.com/auth/cloud-platform: See, edit, configure, and delete your Google Cloud data and see
              the email address for your Google Account.
            https://www.googleapis.com/auth/admin.directory.group.member.readonly: View group subscriptions on your domain
            https://www.googleapis.com/auth/admin.directory.orgunit.readonly: View organization units on your domain
            https://www.googleapis.com/auth/admin.directory.user.alias: View and manage user aliases on your domain
            https://www.googleapis.com/auth/admin.directory.customer.readonly: View customer related information
            https://www.googleapis.com/auth/admin.directory.domain: View and manage the provisioning of domains for your customers
  schemas:
    BatchChangeChromeOsDeviceStatusRequest:
      type: object
      description: A request for changing the status of a batch of ChromeOS devices.
      properties:
        deviceIds:
          description: Required. List of the IDs of the ChromeOS devices to change. Maximum 50.
          items:
            type: string
          type: array
        changeChromeOsDeviceStatusAction:
          type: string
          description: Required. The action to take on the ChromeOS device in order to change its status.
          enum:
          - CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_UNSPECIFIED
          - CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_DEPROVISION
          - CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_DISABLE
          - CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_REENABLE
        deprovisionReason:
          type: string
          description: Optional. The reason behind a device deprovision. Must be provided if 'changeChromeOsDeviceStatusAction'
            is set to 'CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_DEPROVISION'. Otherwise, omit this field.
          enum:
          - DEPROVISION_REASON_UNSPECIFIED
          - DEPROVISION_REASON_SAME_MODEL_REPLACEMENT
          - DEPROVISION_REASON_UPGRADE
          - DEPROVISION_REASON_DOMAIN_MOVE
          - DEPROVISION_REASON_SERVICE_EXPIRATION
          - DEPROVISION_REASON_OTHER
          - DEPROVISION_REASON_DIFFERENT_MODEL_REPLACEMENT
          - DEPROVISION_REASON_RETIRING_DEVICE
          - DEPROVISION_REASON_UPGRADE_TRANSFER
          - DEPROVISION_REASON_NOT_REQUIRED
          - DEPROVISION_REASON_REPAIR_CENTER
    BatchChangeChromeOsDeviceStatusResponse:
      type: object
      properties:
        changeChromeOsDeviceStatusResults:
          type: array
          items:
            $ref: '#/components/schemas/ChangeChromeOsDeviceStatusResult'
          description: The results for each of the ChromeOS devices provided in the request.
      description: The response of changing the status of a batch of ChromeOS devices.
    ChangeChromeOsDeviceStatusResult:
      properties:
        deviceId:
          description: The unique ID of the ChromeOS device.
          type: string
        response:
          $ref: '#/components/schemas/ChangeChromeOsDeviceStatusSucceeded'
          description: The device could change its status successfully.
        error:
          $ref: '#/components/schemas/Status'
          description: The error result of the operation in case of failure.
      description: The result of a single ChromeOS device for a Change state operation.
      type: object
    ChangeChromeOsDeviceStatusSucceeded:
      properties: {}
      type: object
      description: Response for a successful ChromeOS device status change.
    CountChromeOsDevicesResponse:
      properties:
        count:
          format: int64
          type: string
          description: The total number of devices matching the request.
      type: object
      description: A response for counting ChromeOS devices.
    DirectoryChromeosdevicesCommand:
      description: Information regarding a command that was issued to a device.
      properties:
        payload:
          description: The payload that the command specified, if any.
          type: string
        issueTime:
          description: The timestamp when the command was issued by the admin.
          type: string
          format: google-datetime
        type:
          type: string
          enum:
          - COMMAND_TYPE_UNSPECIFIED
          - REBOOT
          - TAKE_A_SCREENSHOT
          - SET_VOLUME
          - WIPE_USERS
          - REMOTE_POWERWASH
          - DEVICE_START_CRD_SESSION
          - CAPTURE_LOGS
          - FETCH_CRD_AVAILABILITY_INFO
          - FETCH_SUPPORT_PACKET
          description: The type of the command.
        state:
          enum:
          - STATE_UNSPECIFIED
          - PENDING
          - EXPIRED
          - CANCELLED
          - SENT_TO_CLIENT
          - ACKED_BY_CLIENT
          - EXECUTED_BY_CLIENT
          type: string
          description: Indicates the command state.
        commandId:
          description: Unique ID of a device command.
          type: string
          format: int64
        commandExpireTime:
          type: string
          format: google-datetime
          description: The time at which the command will expire. If the device doesn't execute the command within this time
            the command will become expired.
        commandResult:
          $ref: '#/components/schemas/DirectoryChromeosdevicesCommandResult'
          description: The result of the command execution.
      type: object
    DirectoryChromeosdevicesCommandResult:
      type: object
      description: The result of executing a command.
      properties:
        executeTime:
          description: The time at which the command was executed or failed to execute.
          format: google-datetime
          type: string
        errorMessage:
          description: The error message with a short explanation as to why the command failed. Only present if the command
            failed.
          type: string
        result:
          type: string
          enum:
          - COMMAND_RESULT_TYPE_UNSPECIFIED
          - IGNORED
          - FAILURE
          - SUCCESS
          description: The result of the command.
        commandResultPayload:
          description: 'The payload for the command result. The following commands respond with a payload: * `DEVICE_START_CRD_SESSION`:
            Payload is a stringified JSON object in the form: { "url": url }. The provided URL links to the Chrome Remote
            Desktop session and requires authentication using only the `email` associated with the command''s issuance. *
            `FETCH_CRD_AVAILABILITY_INFO`: Payload is a stringified JSON object in the form: { "deviceIdleTimeInSeconds":
            number, "userSessionType": string, "remoteSupportAvailability": string, "remoteAccessAvailability": string }.
            The "remoteSupportAvailability" field is set to "AVAILABLE" if `shared` CRD session to the device is available.
            The "remoteAccessAvailability" field is set to "AVAILABLE" if `private` CRD session to the device is available.'
          type: string
    DirectoryChromeosdevicesIssueCommandRequest:
      type: object
      properties:
        commandType:
          type: string
          description: The type of command.
          enum:
          - COMMAND_TYPE_UNSPECIFIED
          - REBOOT
          - TAKE_A_SCREENSHOT
          - SET_VOLUME
          - WIPE_USERS
          - REMOTE_POWERWASH
          - DEVICE_START_CRD_SESSION
          - CAPTURE_LOGS
          - FETCH_CRD_AVAILABILITY_INFO
          - FETCH_SUPPORT_PACKET
        payload:
          type: string
          description: 'The payload for the command, provide it only if command supports it. The following commands support
            adding payload: * `SET_VOLUME`: Payload is a stringified JSON object in the form: { "volume": 50 }. The volume
            has to be an integer in the range [0,100]. * `DEVICE_START_CRD_SESSION`: Payload is optionally a stringified JSON
            object in the form: { "ackedUserPresence": true, "crdSessionType": string }. `ackedUserPresence` is a boolean.
            By default, `ackedUserPresence` is set to `false`. To start a Chrome Remote Desktop session for an active device,
            set `ackedUserPresence` to `true`. `crdSessionType` can only select from values `private` (which grants the remote
            admin exclusive control of the ChromeOS device) or `shared` (which allows the admin and the local user to share
            control of the ChromeOS device). If not set, `crdSessionType` defaults to `shared`. The `FETCH_CRD_AVAILABILITY_INFO`
            command can be used to determine available session types on the device. * `REBOOT`: Payload is a stringified JSON
            object in the form: { "user_session_delay_seconds": 300 }. The `user_session_delay_seconds` is the amount of seconds
            to wait before rebooting the device if a user is logged in. It has to be an integer in the range [0,300]. When
            payload is not present for reboot, 0 delay is the default. Note: This only applies if an actual user is logged
            in, including a Guest. If the device is in the login screen or in Kiosk mode the value is not respected and the
            device immediately reboots. * `FETCH_SUPPORT_PACKET`: Payload is optionally a stringified JSON object in the form:
            {"supportPacketDetails":{ "issueCaseId": optional_support_case_id_string, "issueDescription": optional_issue_description_string,
            "requestedDataCollectors": []}} The list of available `data_collector_enums` are as following: Chrome System Information
            (1), Crash IDs (2), Memory Details (3), UI Hierarchy (4), Additional ChromeOS Platform Logs (5), Device Event
            (6), Intel WiFi NICs Debug Dump (7), Touch Events (8), Lacros (9), Lacros System Information (10), ChromeOS Flex
            Logs (11), DBus Details (12), ChromeOS Network Routes (13), ChromeOS Shill (Connection Manager) Logs (14), Policies
            (15), ChromeOS System State and Logs (16), ChromeOS System Logs (17), ChromeOS Chrome User Logs (18), ChromeOS
            Bluetooth (19), ChromeOS Connected Input Devices (20), ChromeOS Traffic Counters (21), ChromeOS Virtual Keyboard
            (22), ChromeOS Network Health (23). See more details in [help article](https://support.google.com/chrome/a?p=remote-log).'
      description: A request for issuing a command.
    DirectoryChromeosdevicesIssueCommandResponse:
      description: A response for issuing a command.
      type: object
      properties:
        commandId:
          description: The unique ID of the issued command, used to retrieve the command status.
          type: string
          format: int64
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    Status:
      type: object
      description: 'The `Status` type defines a logical error model that is suitable for different programming environments,
        including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three
        pieces of data: error code, error message, and error details. You can find out more about this error model and how
        to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
      properties:
        code:
          format: int32
          description: The status code, which should be an enum value of google.rpc.Code.
          type: integer
        message:
          description: A developer-facing error message, which should be in English. Any user-facing error message should
            be localized and sent in the google.rpc.Status.details field, or localized by the client.
          type: string
        details:
          items:
            additionalProperties:
              description: Properties of the object. Contains field @type with type URL.
            type: object
          type: array
          description: A list of messages that carry the error details. There is a common set of message types for APIs to
            use.
x-provenance:
  method: harvested
  publisher: Google
  source: https://admin.googleapis.com/$discovery/rest?version=directory_v1
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261109)