Skip to content
Start here

List deployment groups

client.ZeroTrust.Devices.DeploymentGroups.List(ctx, params) (*V4PagePaginationArray[DeploymentGroup], error)
GET/accounts/{account_id}/devices/deployment-groups

Lists all deployment groups for an account. Use deployment groups to assign target WARP client versions to specific devices. This endpoint is in Beta.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
ParametersExpand Collapse
params DeviceDeploymentGroupListParams
AccountID param.Field[string]

Path param

Page param.Field[int64]Optional

Query param: The page number to return.

minimum1
PerPage param.Field[int64]Optional

Query param: The maximum number of deployment groups to return per page.

maximum100
minimum1
ReturnsExpand Collapse
type DeploymentGroup struct{…}
ID string

The ID of the deployment group.

CreatedAt string

The RFC3339Nano timestamp when the deployment group was created.

Name string

A user-friendly name for the deployment group.

maxLength255
minLength1
UpdatedAt string

The RFC3339Nano timestamp when the deployment group was last updated.

VersionConfig []DeploymentGroupVersionConfig

Contains version configurations for different target environments.

TargetEnvironment string

The target environment for the client version (e.g., windows, macos).

Version string

The specific client version to deploy.

PolicyIDs []stringOptional

Contains a list of policy IDs assigned to this deployment group.

List deployment groups

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.DeploymentGroups.List(context.TODO(), zero_trust.DeviceDeploymentGroupListParams{
    AccountID: cloudflare.F("account_id"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "created_at": "2026-02-14T13:17:00.123456789Z",
      "name": "Engineering Ring 0",
      "updated_at": "2026-02-14T13:17:00.123456789Z",
      "version_config": [
        {
          "target_environment": "windows",
          "version": "2026.5.234.0"
        }
      ],
      "policy_ids": [
        "policy-uuid-1",
        "policy-uuid-2"
      ]
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 10,
    "total_count": 10,
    "total_pages": 1
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "result": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "created_at": "2026-02-14T13:17:00.123456789Z",
      "name": "Engineering Ring 0",
      "updated_at": "2026-02-14T13:17:00.123456789Z",
      "version_config": [
        {
          "target_environment": "windows",
          "version": "2026.5.234.0"
        }
      ],
      "policy_ids": [
        "policy-uuid-1",
        "policy-uuid-2"
      ]
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 10,
    "total_count": 10,
    "total_pages": 1
  },
  "success": true
}