{
  "$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-system-list-out-schema.json",
  "title": "SystemListOut",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-enterprise-linux-8-vulnerability-api-openapi.yml#/components/schemas/SystemListOut",
  "type": "object",
  "properties": {
    "data": {
      "oneOf": [
        {
          "type": "string",
          "description": "CSV export of the JSON."
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Host ID."
              },
              "type": {
                "type": "string",
                "description": "Type of the record."
              },
              "attributes": {
                "type": "object",
                "properties": {
                  "cve_count": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Number of CVE exposures for the system."
                  },
                  "display_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "System's name,"
                  },
                  "inventory_id": {
                    "type": "string",
                    "description": "Host ID."
                  },
                  "insights_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Insights host ID."
                  },
                  "last_evaluation": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date of last evaluation."
                  },
                  "rules_evaluation": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date of last security rules evaluation."
                  },
                  "opt_out": {
                    "type": "boolean",
                    "description": "Opt out status of the system."
                  },
                  "last_upload": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date of the latest upload of archive."
                  },
                  "os": {
                    "type": "string",
                    "description": "Operating system."
                  },
                  "rhsm_lock": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "System is locked to following RHSM version."
                  },
                  "stale_timestamp": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date when stale system becomes stale."
                  },
                  "stale_warning_timestamp": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date when stale system becomes hidden in the application."
                  },
                  "updated": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date of the lastest upload of archive taken from Inventory syndicated data."
                  },
                  "tags": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "namespace": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Namespace of single tag."
                        },
                        "key": {
                          "type": "string",
                          "description": "Key of the single tag."
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Value of the single tag."
                        }
                      },
                      "required": [
                        "namespace",
                        "key",
                        "value"
                      ]
                    },
                    "description": "Tags given to the system."
                  },
                  "culled_timestamp": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Timestamp from which the host is considered deleted."
                  },
                  "inventory_group": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of inventory group."
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of inventory group."
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ]
                    }
                  },
                  "host_type": {
                    "type": "string",
                    "description": "Type of the host",
                    "enum": [
                      "rpmdnf",
                      "image"
                    ]
                  }
                },
                "required": [
                  "cve_count",
                  "display_name",
                  "inventory_id",
                  "insights_id",
                  "last_evaluation",
                  "rules_evaluation",
                  "opt_out",
                  "last_upload",
                  "os",
                  "rhsm_lock",
                  "stale_timestamp",
                  "stale_warning_timestamp",
                  "tags",
                  "culled_timestamp",
                  "inventory_group",
                  "host_type"
                ]
              }
            },
            "required": [
              "id",
              "type",
              "attributes"
            ]
          }
        }
      ]
    },
    "links": {
      "$ref": "#/$defs/Links"
    },
    "meta": {
      "$ref": "#/$defs/MetaSystems"
    }
  },
  "required": [
    "data",
    "links",
    "meta"
  ],
  "$defs": {
    "Links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "string",
          "description": "Link to first page."
        },
        "last": {
          "type": "string",
          "description": "Link to last page."
        },
        "next": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to next page."
        },
        "previous": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to next page."
        }
      },
      "required": [
        "first",
        "last",
        "next",
        "previous"
      ]
    },
    "Meta": {
      "type": "object",
      "properties": {
        "filter": {
          "type": [
            "string",
            "null"
          ],
          "description": "Full text filter"
        },
        "limit": {
          "type": "integer",
          "description": "Maximum number of paginated results."
        },
        "offset": {
          "type": "integer",
          "description": "First record of paginated response."
        },
        "page": {
          "type": "integer",
          "description": "Page number of paginated response."
        },
        "page_size": {
          "type": "integer",
          "description": "Number of records per page of paginated response."
        },
        "pages": {
          "type": "integer",
          "description": "Total number of pages of paginated response."
        },
        "sort": {
          "type": [
            "string",
            "null"
          ],
          "description": "Sorting filter."
        },
        "total_items": {
          "type": "integer",
          "description": "Total number of records."
        },
        "data_format": {
          "type": "string",
          "description": "Format of the output data, either JSON (default) or CSV."
        }
      },
      "required": [
        "filter",
        "limit",
        "offset",
        "page",
        "page_size",
        "pages",
        "sort",
        "total_items",
        "data_format"
      ]
    },
    "MetaPermissions": {
      "type": "object",
      "properties": {
        "permissions": {
          "type": "array",
          "description": "Fetched permissions from RBAC for given user",
          "nullable": false,
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "permissions"
      ]
    },
    "MetaSystems": {
      "allOf": [
        {
          "$ref": "#/$defs/Meta"
        },
        {
          "$ref": "#/$defs/MetaPermissions"
        },
        {
          "type": "object",
          "properties": {
            "excluded": {
              "type": [
                "string",
                "null"
              ],
              "description": "Display setting of opted out systems."
            },
            "rhel_version": {
              "type": [
                "string",
                "null"
              ],
              "description": "Filter base on system RHEL version."
            }
          },
          "required": [
            "excluded",
            "rhel_version"
          ]
        }
      ]
    }
  }
}