---
title: "List groups"
url: "https://developers.vzconnect.com/apis/groups-hierarchy-api/versions/6301049c-0ba5-4584-a236-ea7417e150ff/operations/listGroups"
---

> Full API specification: https://developers.vzconnect.com/apis/groups-hierarchy-api/versions/6301049c-0ba5-4584-a236-ea7417e150ff.md

# List groups

`GET` `/v1/groups`

Operation ID: `listGroups`

Retrieves a paginated list of groups within the account that the caller is authorized to view.

## Query parameters

- `page_token` (string, optional) - Opaque pagination token used to fetch the next page of results. Omit this parameter on the initial request.

## Header parameters

- `traceparent` (string, optional) - Standard W3C Trace Context header used to propagate distributed tracing identifiers across microservices.
- `tracestate` (string, optional) - Standard W3C Trace Context header containing vendor-specific routing and tracing key-value pairs.

## Responses

- `200` - Ok
- `400` - Bad Request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found
- `429` - Too Many Requests
- `default` - Internal Server Error

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Groups Management API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /v1/groups:
    get:
      tags:
        - Groups Management API
      operationId: listGroups
      summary: List groups
      description: Retrieves a paginated list of groups within the account that the
        caller is authorized to view.
      parameters:
        - $ref: "#/components/parameters/PageToken"
        - $ref: "#/components/parameters/TraceParent"
        - $ref: "#/components/parameters/TraceState"
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupList"
              examples:
                List of groups (first page):
                  value:
                    items:
                      - groupId: 019726a4-3b2c-7def-8abc-1234567890ab
                        name: North West Region Fleet
                        parentGroup:
                          groupId: 018e4b6d-a1b2-7c3d-8e4f-5a6b7c8d9e0f
                          externalIds:
                            - fleet:north-region-01
                        externalIds:
                          - fleet:north-west-region-01
                        links:
                          - href: /groups/019726a4-3b2c-7def-8abc-1234567890ab
                            rel: self
                            method: GET
                          - href: /groups/018e4b6d-a1b2-7c3d-8e4f-5a6b7c8d9e0f
                            rel: up
                            method: GET
                      - groupId: 019726b7-9c4d-7a1e-b2f3-abcdef012345
                        name: South West Region Fleet
                        parentGroup:
                          groupId: 018e4b6d-a1b2-7c3d-8e4f-5a6b7c8d9e0f
                          externalIds:
                            - fleet:north-region-01
                        externalIds:
                          - fleet:south-west-region-01
                        links:
                          - href: /groups/019726b7-9c4d-7a1e-b2f3-abcdef012345
                            rel: self
                            method: GET
                          - href: /groups/018e4b6d-a1b2-7c3d-8e4f-5a6b7c8d9e0f
                            rel: up
                            method: GET
                    links:
                      - href: /groups
                        rel: self
                        method: GET
                      - href: /groups?page_token=MDE5NzI2YTQzYjJjN2RlZjhhYmM
                        rel: next
                        method: GET
                Nothing found:
                  value:
                    items: []
                    links:
                      - href: /groups
                        rel: self
                        method: GET
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        default:
          $ref: "#/components/responses/InternalServerError"
components:
  parameters:
    PageToken:
      name: page_token
      in: query
      description: Opaque pagination token used to fetch the next page of results.
        Omit this parameter on the initial request.
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 200
        pattern: ^[^\n]+$
    TraceParent:
      name: traceparent
      in: header
      description: Standard W3C Trace Context header used to propagate distributed
        tracing identifiers across microservices.
      required: false
      schema:
        type: string
        minLength: 55
        maxLength: 55
        pattern: ^00-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$
    TraceState:
      name: tracestate
      in: header
      description: Standard W3C Trace Context header containing vendor-specific
        routing and tracing key-value pairs.
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 512
        pattern: ^[^\n]{1,512}$
  schemas:
    GroupList:
      title: GroupList
      description: A paginated collection of group resources.
      type: object
      additionalProperties: false
      required:
        - items
      properties:
        items:
          type: array
          description: The page of group resources.
          minItems: 0
          maxItems: 200
          items:
            $ref: "#/components/schemas/Group"
        links:
          description: Related resources, pagination information (self, next, prev).
          readOnly: true
          type: array
          uniqueItems: true
          minItems: 0
          maxItems: 10
          items:
            $ref: "#/components/schemas/Link"
    Group:
      title: Group
      description: Group metadata resource
      type: object
      additionalProperties: false
      required:
        - groupId
        - name
      properties:
        groupId:
          $ref: "#/components/schemas/IdReadOnly"
        name:
          $ref: "#/components/schemas/GroupName"
        parentGroup:
          type: object
          description: The primary (parent) group. Null for root groups.
          title: ParentGroup
          properties:
            groupId:
              $ref: "#/components/schemas/IdReadOnly"
            externalIds:
              type: array
              description: External identifiers of the primary group.
              minItems: 0
              maxItems: 1
              items:
                $ref: "#/components/schemas/IdReadOnly"
        externalIds:
          type: array
          description: Optional customer-owned external identifiers for the group.
          minItems: 0
          maxItems: 1
          items:
            $ref: "#/components/schemas/IdReadOnly"
        links:
          description: Related resources
          readOnly: true
          type: array
          uniqueItems: true
          minItems: 0
          maxItems: 100
          items:
            $ref: "#/components/schemas/Link"
    Link:
      title: Link
      description: Reference to another resource
      type: object
      additionalProperties: false
      required:
        - href
        - rel
      properties:
        href:
          description: URL of linked resource
          type: string
          format: uri-reference
          minLength: 1
          maxLength: 2000
          pattern: ^[^\n]+$
        rel:
          description: Meaning of the values described at IANA (self, next, prev, up).
          type: string
          minLength: 2
          maxLength: 10
          pattern: ^(self|next|prev|up)$
        method:
          description: HTTP method to interact with linked resource
          type: string
          minLength: 3
          maxLength: 6
          enum:
            - GET
    ProblemJson:
      title: ProblemJson
      description: JSON Schema for HTTP Problems as defined by RFC 9457
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: A URI reference that identifies the problem type.
          pattern: ^[^\n]*$
        title:
          type: string
          description: A short, human-readable summary of the problem type.
          minLength: 8
          maxLength: 1024
          pattern: ^[^\n]*$
        status:
          type: integer
          format: int32
          description: The HTTP status code generated by the origin server for this
            occurrence of the problem.
          minimum: 300
          maximum: 599
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
          minLength: 8
          maxLength: 2048
          pattern: ^[^\n]*$
        instance:
          type: string
          format: uri-reference
          description: A URI reference that identifies the specific occurrence of the
            problem.
          pattern: ^[^\n]*$
        pointer:
          type: string
          description: A pointer to locate the problem within the request's content using
            a JSON Pointer. Verizon extension to RFC 9457.
          minLength: 1
          maxLength: 2048
          pattern: ^(\/[^\n]+)*$
        debugId:
          type: string
          description: A unique error identifier string generated on the service-side and
            logged for correlation purposes. Verizon extension to RFC 9457.
          minLength: 8
          maxLength: 2048
          pattern: ^[^\n]*$
        errors:
          type: array
          description: List of individual error occurrences.
          minItems: 0
          maxItems: 50
          items:
            type: object
            additionalProperties: false
            required:
              - detail
            properties:
              pointer:
                type: string
                description: A pointer to locate the problem within the request's content using
                  a JSON Pointer.
                minLength: 1
                maxLength: 2048
                pattern: ^(\/[^\n]+)*$
              detail:
                type: string
                description: A human-readable explanation specific to this occurrence of the
                  problem.
                minLength: 8
                maxLength: 2048
                pattern: ^[^\n]*$
              debugId:
                type: string
                description: A unique error identifier generated on the service-side for
                  correlation purposes.
                minLength: 8
                maxLength: 2048
                pattern: ^[^\n]*$
    IdReadOnly:
      type: string
      description: Reference to an object in Reveal
      readOnly: true
      minLength: 1
      maxLength: 120
      pattern: ^[^\n]{1,120}$
    GroupName:
      type: string
      description: Name of the group
      minLength: 1
      maxLength: 32
      pattern: ^[\w\s\-\.&()]{1,32}$
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    TooManyRequests:
      description: Too Many Requests
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    InternalServerError:
      description: Internal Server Error
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
```
