Directory API: Chrome Devices

Retrieve all Chrome devices for an account

To retrieve all of an account's Chrome devices, use the following GET request and include the authorization described in Authorize requests. For readability, this code sample has line returns:

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer or customerId/
devices/chromeos?projection=basic or full&query=query
&orderBy=orderBy category&sortOrder=ascending or descending order
&pageToken=token for next results page
&maxResults=max number of results per page

  • The customerId is a unique identifier of the customer's Google account.
  • As an account administrator, you can also use the string my_customer which represents your account's customerId. Another way to get the customerId value is to use the Retrieve a user operation. Use your administrator email address or your administrator unique user id value in the operation's userKey argument.
For the query strings, request, and response properties, see the API Reference.

JSON request

In this example query=user:help desk is the annotatedUser value found in a response body. If the query was query=id:device serialNumber, the value is the device's serialNumber also found in a response body. For readability, this code sample has line returns:
GET https://www.googleapis.com/admin/directory/v1/customer/my_customer/devices/
chromeos?projection=full&query=user:help desk&orderBy=status
&sortOrder=ascending&pageToken=pageToken value&maxResults=100

JSON response

A successful response returns an HTTP 200 status code.

{
  "kind": "directory#chromeosdevices",
  "chromeosdevices": [
     {
       "kind": "directory#chromeosdevice",
       "deviceId": "deviceId value",
       "serialNumber": "device serialNumber",
       "status": "ACTIVE",
       "lastSync": "2013-03-05T17:30:04.325Z",
       "supportEndDate": "2014-04-05T17:30:04.325Z",
       "annotatedUser": "help desk",
       "annotatedLocation": "Mountain View help desk Chromebook",
       "annotatedAssetId": "1234567890",
       "notes": "Loaned from support",
       "orderNumber": "1234",
       "willAutoRenew": true,
       "osVersion": "Browser Version 18.0",
       "platformVersion": "Platform Version 1415.2.0",
       "firmwareVersion": "Firmware Version 1.2.3.4",
       "bootMode": "validated",
       "lastEnrollmentTime": "2012-04-05T17:30:04.325Z",
       "orgUnitPath": "corp/engineering"
     },
     {
       "kind": "directory#chromeosdevice",
       "deviceId": "deviceId value",
       "serialNumber": "device serialNumber",
       "status": "SHIPPED",
       "supportEndDate": "1404457200000",
       "model": "model value",
       "meid": "meid value",
       "macAddress": "macAddress value",
       "orderNumber": "1234",
       "willAutoRenew": true
     }
  ],
  "nextPageToken": "nextPageToken value"
}

This response example includes the model, meid, and macAddress properties. If a device does not have these properties, they are not included in the response.

Export a MEID list

The meid is Mobile Equipment Identifier (MEID) for the 3G mobile card in a Chrome device. A MEID is typically used when adding a device to a wireless carrier's post-pay service plan. To export the MEID list, use the following GET request and the nextPageToken values to retrieve the full list of MEIDs. For readability, this code sample has line returns:

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer or customerId/
devices/chromeos?fields=nextPageToken,chromeosdevices(meid)

Retrieve a Chrome device

To retrieve a Chrome device's properties, use the following GET request and include the authorization described in Authorize requests. For readability, this code sample has line returns:

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer or customerId/
devices/chromeos/deviceId?projection=full or basic

  • The customerId is a unique identifier of the customer's Google account.
  • As an account administrator, you can also use the string my_customer which represents your account's customerId. Another way to get the customerId value is to use the Retrieve a user operation. Use your administrator email address or your administrator unique user id value in the operation's userKey argument.
  • The deviceId is a unique identifier for a device and is found in the response of the Retrieve all Chrome devices operation.
For the query strings, request, and response properties, see the API Reference.

JSON request

An example request. For readability, this code sample has line returns:
GET https://www.googleapis.com/admin/directory/v1/customer/my_customer/devices/
chromeos/deviceId value?projection=full

JSON response

A successful response returns an HTTP 200 status code. Along with the status code, the response returns the Chrome device properties:

{
  "kind": "directory#chromeosdevice",
  "deviceId": "deviceId value",
  "serialNumber": "device serialNumber",
  "status": "ACTIVE",
  "lastSync": "2012-04-05T17:30:04.325Z",
  "supportEndDate": "2014-04-05T17:30:04.325Z",
  "annotatedUser": "help desk",
  "annotatedLocation": "Mountain View help desk Chromebook",
  "annotatedAssetId": "12345667890",
  "notes": "Loaned from support",
  "orderNumber": "123456",
  "willAutoRenew": true,
  "osVersion": "Browser Version 18.0",
  "platformVersion": "Platform Version 1415.2.0",
  "firmwareVersion": "Firmware Version 1.2.3.4",
  "bootMode": "validated"
  "lastEnrollmentTime": "2012-04-05T17:30:04.325Z",
  "orgUnitPath": "corp/engineering"
}

Update a Chrome device

To update a Chrome device, use the following PUT request and include the authorization described in Authorize requests. For readability, this code sample has line returns:

PUT https://www.googleapis.com/admin/directory/v1/customer/my_customer or customerId/
devices/chromeos/deviceId?projection=full or basic

  • The customerId is a unique identifier of the customer's Google account.
  • As an account administrator, you can also use the string my_customer which represents your account's customerId. Another way to get the customerId value is to use the Retrieve a user operation. Use your administrator email address or your administrator unique user id value in the operation's userKey argument.
  • The deviceId is a unique identifier for a device and is found in the response of the Retrieve all Chrome devices operation.
For the query strings, request, and response properties, see the API Reference.

JSON request

The following example JSON request updates a Chrome device's annotatedUser, annotatedLocation,annotatedAssetId, notes, and orgUnitPath properties. For readability, this code sample has line returns:

PUT https://www.googleapis.com/admin/directory/v1/customer/my_customer/
devices/chromeos/deviceId value?projection=full
The request body example:
{
  "deviceId": "deviceId value",
  "annotatedUser": "help desk",
  "annotatedLocation": "Mountain View help desk Chromebook",
  "annotatedAssetId": "1234567890",
  "notes": "Loaned from support",
  "orgUnitPath": "/corp/sales"
}

For an update request, you only need to submit the updated information in your request. You do not need to enter all of the Chrome device's properties that can be updated.

A successful response returns an HTTP 200 status code. Along with the status code, the response returns the properties for the updated Chrome device.

Take action on a Chrome device

To take an action that impacts a Chrome device, use the following POST request and include the authorization described in Authorize requests. For readability, this code sample has line returns:

POST https://www.googleapis.com/admin/directory/v1/customer/my_customer or customerId/
devices/chromeos/deviceId/action

  • The customerId is a unique identifier of the customer's Google account.
  • As an account administrator, you can also use the string my_customer which represents your account's customerId. Another way to get the customerId value is to use the Retrieve a user operation. Use your administrator email address or your administrator unique user id value in the operation's userKey argument.
  • The deviceId is a unique identifier for a device and is found in the response of the Retrieve all Chrome devices operation.
For the request and response properties, see the API Reference.

JSON request

The following JSON request shows a sample request to deprovision and disable a Chrome device':

POST https://www.googleapis.com/admin/directory/v1/customer/my_customer/
devices/chromeos/deviceId/action
The request body for a sample deprovision is:
{
  "action": "deprovision",
  "deprovisionReason": "retiring device"
}
The request body for disable is:
{
  "action": "disable"
}

A successful response returns an HTTP 200 status code.

Move Chrome devices to Organization Unit

To move up to 50 Chrome devices to an Organization Unit, use the following POST request and include the authorization described in Authorize requests. For readability, this code sample has line returns:

POST https://www.googleapis.com/admin/directory/v1/customer/my_customer/
devices/chromeos/moveDevicesToOu?orgUnitPath=/SomeOuName

  • The customerId is a unique identifier of the customer's Google account.
  • As an account administrator, you can also use the string my_customer which represents your account's customerId. Another way to get the customerId value is to use the Retrieve a user operation. Use your administrator email address or your administrator unique user id value in the operation's userKey argument.
For the request and response properties, see the API Reference.

JSON request

The following JSON request shows a sample request to move 3 Chrome devices to Organization Unit named /Marketing:

POST https://www.googleapis.com/admin/directory/v1/customer/my_customer/
devices/chromeos/chromeos/moveDevicesToOu?orgUnitPath=/Marketing
The request body for a sample deprovision is:
{
  "deviceIds": ["deviceId_1", "deviceId_2", "deviceId_3"]
}

A successful response returns an HTTP 200 status code.

Send feedback about...

Directory API
Directory API