---
title: List devices (deprecated)
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Zero Trust](https://developers.cloudflare.com/api/go/resources/zero_trust)

[Devices](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/devices)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List devices (deprecated)

Deprecated

client.ZeroTrust.Devices.List(ctx, query) (\*SinglePage\[[Device](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/devices

List WARP devices. Not supported when [multi-user mode](https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/windows-multiuser/) is enabled for the account.

**Deprecated**: please use one of the following endpoints instead:

- GET /accounts/{account\_id}/devices/physical-devices
- GET /accounts/{account\_id}/devices/registrations

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### ParametersExpand Collapse

<details>

<summary>

query DeviceListParams

</summary>

AccountID param.Field\[string]

<a href="#(resource)%20zero_trust.devices%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.devices%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type Device struct{…}

</summary>

ID stringOptional

Registration ID. Equal to Device ID except for accounts which enabled <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/windows-multiuser/">multi-user mode</a>.

maxLength36

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Created TimeOptional

When the device was created.

formatdate-time

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

Deleted boolOptional

True if the device was deleted.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20deleted">Link to this property</a>

<details>

<summary>

DeviceType DeviceDeviceTypeOptional

</summary>

One of the following:

const DeviceDeviceTypeWindows DeviceDeviceType = "windows"

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20device_type%20%3E%20(member)%200">Link to this property</a>

const DeviceDeviceTypeMac DeviceDeviceType = "mac"

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20device_type%20%3E%20(member)%201">Link to this property</a>

const DeviceDeviceTypeLinux DeviceDeviceType = "linux"

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20device_type%20%3E%20(member)%202">Link to this property</a>

const DeviceDeviceTypeAndroid DeviceDeviceType = "android"

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20device_type%20%3E%20(member)%203">Link to this property</a>

const DeviceDeviceTypeIos DeviceDeviceType = "ios"

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20device_type%20%3E%20(member)%204">Link to this property</a>

const DeviceDeviceTypeChromeos DeviceDeviceType = "chromeos"

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20device_type%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20device_type">Link to this property</a>

IP stringOptional

IPv4 or IPv6 address.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20ip">Link to this property</a>

Key stringOptional

The device’s public key.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20key">Link to this property</a>

LastSeen TimeOptional

When the device last connected to Cloudflare services.

formatdate-time

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20last_seen">Link to this property</a>

MacAddress stringOptional

The device mac address.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20mac_address">Link to this property</a>

Manufacturer stringOptional

The device manufacturer name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20manufacturer">Link to this property</a>

Model stringOptional

The device model name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20model">Link to this property</a>

Name stringOptional

The device name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

OSDistroName stringOptional

The Linux distro name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20os_distro_name">Link to this property</a>

OSDistroRevision stringOptional

The Linux distro revision.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20os_distro_revision">Link to this property</a>

OSVersion stringOptional

The operating system version.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20os_version">Link to this property</a>

OSVersionExtra stringOptional

Additional operating system version details. For Windows, the UBR (Update Build Revision). For Mac or iOS, the Product Version Extra. For Linux, the distribution name and version.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20os_version_extra">Link to this property</a>

RevokedAt TimeOptional

When the device was revoked.

formatdate-time

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20revoked_at">Link to this property</a>

SerialNumber stringOptional

The device serial number.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20serial_number">Link to this property</a>

Updated TimeOptional

When the device was updated.

formatdate-time

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20updated">Link to this property</a>

<details>

<summary>

User DeviceUserOptional

</summary>

ID stringOptional

UUID.

maxLength36

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20id">Link to this property</a>

Email stringOptional

The contact email address of the user.

maxLength90

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20email">Link to this property</a>

Name stringOptional

The enrolled device user’s name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20user">Link to this property</a>

Version stringOptional

The WARP client version.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.devices%20%3E%20(model)%20device%20%3E%20(schema)>)

### List devices (deprecated)

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.ZeroTrust.Devices.List(context.TODO(), zero_trust.DeviceListParams{
    AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "created": "2017-06-14T00:00:00Z",
      "deleted": true,
      "device_type": "windows",
      "ip": "1.1.1.1",
      "key": "yek0SUYoOQ10vMGsIYAevozXUQpQtNFJFfFGqER/BGc=",
      "last_seen": "2017-06-14T00:00:00Z",
      "mac_address": "00-00-5E-00-53-00",
      "manufacturer": "My phone corp",
      "model": "MyPhone(pro-X)",
      "name": "My mobile device",
      "os_distro_name": "ubuntu",
      "os_distro_revision": "1.0.0",
      "os_version": "10.0.0",
      "os_version_extra": "(a) or 6889 or Ubuntu 24.04",
      "revoked_at": "2017-06-14T00:00:00Z",
      "serial_number": "EXAMPLEHMD6R",
      "updated": "2017-06-14T00:00:00Z",
      "user": {
        "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        "email": "user@example.com",
        "name": "John Appleseed"
      },
      "version": "1.0.0"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "created": "2017-06-14T00:00:00Z",
      "deleted": true,
      "device_type": "windows",
      "ip": "1.1.1.1",
      "key": "yek0SUYoOQ10vMGsIYAevozXUQpQtNFJFfFGqER/BGc=",
      "last_seen": "2017-06-14T00:00:00Z",
      "mac_address": "00-00-5E-00-53-00",
      "manufacturer": "My phone corp",
      "model": "MyPhone(pro-X)",
      "name": "My mobile device",
      "os_distro_name": "ubuntu",
      "os_distro_revision": "1.0.0",
      "os_version": "10.0.0",
      "os_version_extra": "(a) or 6889 or Ubuntu 24.04",
      "revoked_at": "2017-06-14T00:00:00Z",
      "serial_number": "EXAMPLEHMD6R",
      "updated": "2017-06-14T00:00:00Z",
      "user": {
        "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        "email": "user@example.com",
        "name": "John Appleseed"
      },
      "version": "1.0.0"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```