Method: devices.list

Lists/Searches devices.

HTTP request

GET https://cloudidentity.googleapis.com/v1/devices

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
customer

string

Required. Resource name of the customer in the format: customers/{customer_id}, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use customers/my_customer. If you're using this API to manage another organization, use customers/{customer_id}, where customer_id is the customer to whom the device belongs.

filter

string

Optional. Additional restrictions when fetching list of devices. Help Center article link

pageSize

integer

Optional. The maximum number of Devices to return. If unspecified, at most 20 Devices will be returned. The maximum value is 100; values above 100 will be coerced to 100.

pageToken

string

Optional. A page token, received from a previous devices.list call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to devices.list must match the call that provided the page token.

orderBy

string

Optional. Order specification for devices in the response. Only one of the following field names may be used to specify the order: createTime, lastSyncTime, model, osVersion, deviceType and serialNumber. desc may be specified optionally at the end to specify results to be sorted in descending order. Default order is ascending.

view

enum (View)

Optional. The view to use for the List request.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message that is returned from the devices.list method.

JSON representation
{
  "devices": [
    {
      object (Device)
    }
  ],
  "nextPageToken": string
}
Fields
devices[]

object (Device)

Devices meeting the list restrictions.

nextPageToken

string

Token to retrieve the next page of results. Empty if there are no more results.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-identity.devices.readonly
  • https://www.googleapis.com/auth/cloud-identity.devices
  • https://www.googleapis.com/auth/cloud-identity

For more information, see the Authentication Overview.

View

The view determines which devices and device info are present in the response.

Enums
VIEW_UNSPECIFIED Default value. The value is unused.
COMPANY_INVENTORY This view contains all devices imported by the company admin. Each device in the response contains all information specified by the company admin when importing the device (i.e. asset tags). This includes devices that may be unaassigned or assigned to users.
USER_ASSIGNED_DEVICES This view contains all devices with at least one user registered on the device. Each device in the response contains all device information, except for asset tags.