get:
  tags:
    - Client Groups
  summary: Return all client groups
  operationId: ClientgroupsGet
  description: Return a list of all existing client groups sorted by ID in asc order
  responses:
    '200':
      description: Successful Operation
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: ../components/schemas/ClientGroup.yaml
    '400':
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
    '500':
      description: Invalid Operation
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
post:
  tags:
    - Client Groups
  summary: Create a new client group. Require admin access
  operationId: ClientgroupsPost
  description: Create a new client group.
  requestBody:
    description: >-
      Client group to create. Note: ClientGroup.client_ids field should not be set.
      It's read-only.
    content:
      '*/*':
        schema:
          $ref: ../components/schemas/ClientGroup.yaml
    required: true
  responses:
    '201':
      description: Successful Operation
      content: {}
    '400':
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
    '500':
      description: Invalid Operation
      content:
        application/json:
          schema:
            $ref: ../components/schemas/ErrorPayload.yaml
  x-codegen-request-body-name: client group
