{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-enterprise-linux-8/json-schema/red-hat-enterprise-linux-8-resource-types-groups-query-output-schema.json",
  "title": "An Inventory Groups query result in resource-types response format",
  "description": "A paginated group search query result with group entries and their Inventory metadata in paginated resource-types response format.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-enterprise-linux-8-inventory-api-openapi.yml#/components/schemas/ResourceTypesGroupsQueryOutput",
  "allOf": [
    {
      "$ref": "#/$defs/ResourceTypesPaginationOut"
    },
    {
      "properties": {
        "data": {
          "description": "Actual group search query result entries.",
          "items": {
            "$ref": "#/$defs/GroupOutWithHostCount"
          },
          "type": "array"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  ],
  "type": "object",
  "$defs": {
    "AccountNumber": {
      "deprecated": true,
      "description": "A Red Hat Account number that owns the host.",
      "type": [
        "string",
        "null"
      ]
    },
    "GroupId": {
      "$ref": "#/$defs/NonStrictUUID",
      "description": "A durable and reliable platform-wide group identifier. Applications should use this identifier to reference groups."
    },
    "GroupName": {
      "description": "A group’s human-readable name. Must contain only letters, numbers, spaces, hyphens, and underscores.",
      "nullable": false,
      "type": "string"
    },
    "GroupOut": {
      "description": "Data of a single group belonging to an account.",
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountNumber"
        },
        "created": {
          "description": "A timestamp when the entry was created.",
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "$ref": "#/$defs/GroupId"
        },
        "name": {
          "$ref": "#/$defs/GroupName"
        },
        "org_id": {
          "$ref": "#/$defs/OrgId"
        },
        "ungrouped": {
          "description": "Whether the group is the \"ungrouped hosts\" group",
          "type": "boolean"
        },
        "updated": {
          "description": "A timestamp when the entry was last updated.",
          "format": "date-time",
          "type": "string"
        }
      },
      "title": "Group Out Properties",
      "type": "object"
    },
    "GroupOutWithHostCount": {
      "allOf": [
        {
          "$ref": "#/$defs/GroupOut"
        },
        {
          "properties": {
            "host_count": {
              "$ref": "#/$defs/HostCount"
            }
          }
        }
      ],
      "description": "Data of a single group belonging to an account.",
      "title": "Group properties with host count",
      "type": "object"
    },
    "HostCount": {
      "description": "The number of hosts associated with the group.",
      "type": "integer"
    },
    "NonStrictUUID": {
      "format": "uuid",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$|^[0-9a-fA-F]{8}[0-9a-fA-F]{4}[0-9a-fA-F]{4}[0-9a-fA-F]{4}[0-9a-fA-F]{12}$",
      "type": "string"
    },
    "OrgId": {
      "description": "The Org ID of the tenant that owns the host.",
      "type": "string"
    },
    "ResourceTypesPaginationOut": {
      "properties": {
        "links": {
          "description": "A collection of pagination links for resource-types endpoints",
          "properties": {
            "first": {
              "description": "The URI path for the first page in the pagination",
              "type": "string"
            },
            "last": {
              "description": "The URI path for the last page in the pagination",
              "type": "string"
            },
            "next": {
              "description": "The URI path for the next page in the pagination",
              "type": [
                "string",
                "null"
              ]
            },
            "previous": {
              "description": "The URI path for the previous page in the pagination",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "first",
            "previous",
            "next",
            "last"
          ],
          "type": "object"
        },
        "meta": {
          "description": "The metadata for resource-types responses",
          "properties": {
            "count": {
              "description": "The total number of objects returned by the query.",
              "type": "integer"
            }
          },
          "required": [
            "count"
          ],
          "type": "object"
        }
      },
      "required": [
        "meta",
        "links"
      ],
      "type": "object"
    }
  }
}