Warning: The Notifications API is deprecated and will be shutdown soon.

Directory API: Chrome devices

Retrieve all Chrome devices for an account

To return a list of all Chrome devices assigned to an account, 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|customerId}/
devices/chromeos?projection={BASIC|FULL}&query=query
&orderBy=orderBy category&sortOrder={ASCENDING|DESCENDING}
&pageToken=token for next results page, if applicable
&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 path parameter.

For the query strings, request, and response properties, see the API Reference.

Example: Filter devices by user

This first example searches for specific user by using query=user:help desk. The response contains a single chromeosdevice resource, where the annotatedUser is help desk:

JSON request

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer/devices/
chromeos?projection=FULL&query=user:help desk&orderBy=status
&sortOrder=ASCENDING&maxResults=100

JSON response

{
  "kind": "directory#chromeosdevices",
  "chromeosdevices": [
     {
       "kind": "directory#chromeosdevice",
       "etag": "1234567890"
       "deviceId": "def456",
       "serialNumber": "234567",
       "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",
       "recentUsers": [
         {
           "type": "USER_TYPE_MANAGED",
           "email": "user@customer.com"
         }
       ],
       "activeTimeRanges": [
         {
           "date": "2012-04-05",
           "activeTime": "3600000"
         }
       ],
     }
  ],
  "nextPageToken": "abcdefghijkl123"
}

Example: Filter devices by serial number

This second example searches for a specific serial number, by using query=id:123456, where 123456 is the device's serial number. The response show below contains a single matching response, where the serialNumber property matches the search value:

JSON request

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer/devices/
chromeos?projection=FULL&query=id:123456&orderBy=status
&sortOrder=ASCENDING&maxResults=100

JSON response

{
  "kind": "directory#chromeosdevices",
  "chromeosdevices": [
     {
       "kind": "directory#chromeosdevice",
       "deviceId": "abc123",
       "serialNumber": "123456",
       "status": "SHIPPED",
       "supportEndDate": "1404457200000",
       "model": "model_value",
       "meid": "meid_value",
       "macAddress": "mac_address_value",
       "orderNumber": "1234",
       "willAutoRenew": true
     }
  ],
  "nextPageToken": "abcdefghijkl123"
}

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. For full details, see the Chromeosdevices resource representation.

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|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|customerId}/
devices/chromeos/deviceId?projection={FULL|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 path parameter.
  • 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?projection=full

JSON response

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

{
  "kind": "directory#chromeosdevice",
  "deviceId": "device_id_value",
  "serialNumber": "device_serial_number",
  "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|customerId}/
devices/chromeos/deviceId?projection={FULL|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 path parameter.
  • 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?projection=full
The request body example:
{
  "deviceId": "device_id_value",
  "annotatedUser": "help desk",
  "annotatedLocation": "Mountain View help desk Chromebook",
  "annotatedAssetId": "1234567890",
  "notes": "Loaned from support",
  "orgUnitPath": "/corp/sales"
}

For an update request, only include the properties with updated values in your request.

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

Deprovisioning or disabling a Chrome device

To deprovision or disable 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 path parameter.
  • 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 request 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 path parameter.

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 an 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 the device move is:

{
  "deviceIds": ["deviceId_1", "deviceId_2", "deviceId_3"]
}

A successful request returns an HTTP 200 status code.