{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-entra/json-schema/microsoft-entra-microsoft-graph-device-management-reports-schema.json",
  "title": "microsoft.graph.deviceManagementReports",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-entra-devicemanagement-devicemanagementreports-api-openapi.yml#/components/schemas/microsoft.graph.deviceManagementReports",
  "allOf": [
    {
      "$ref": "#/$defs/microsoft.graph.entity"
    },
    {
      "title": "deviceManagementReports",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "exportJobs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/microsoft.graph.deviceManagementExportJob"
          },
          "description": "Entity representing a job to export a report.",
          "x-ms-navigationProperty": true
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.deviceManagementReports",
  "$defs": {
    "microsoft.graph.deviceManagementExportJob": {
      "allOf": [
        {
          "$ref": "#/$defs/microsoft.graph.entity"
        },
        {
          "title": "deviceManagementExportJob",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "expirationDateTime": {
              "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
              "type": "string",
              "description": "Time that the exported report expires.",
              "format": "date-time"
            },
            "filter": {
              "type": [
                "string",
                "null"
              ],
              "description": "Filters applied on the report. The maximum length allowed for this property is 2000 characters."
            },
            "format": {
              "$ref": "#/$defs/microsoft.graph.deviceManagementReportFileFormat"
            },
            "localizationType": {
              "$ref": "#/$defs/microsoft.graph.deviceManagementExportJobLocalizationType"
            },
            "reportName": {
              "type": "string",
              "description": "Name of the report. The maximum length allowed for this property is 2000 characters."
            },
            "requestDateTime": {
              "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
              "type": "string",
              "description": "Time that the exported report was requested.",
              "format": "date-time"
            },
            "select": {
              "type": "array",
              "items": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": "Columns selected from the report. The maximum number of allowed columns names is 256. The maximum length allowed for each column name in this property is 1000 characters."
            },
            "snapshotId": {
              "type": [
                "string",
                "null"
              ],
              "description": "A snapshot is an identifiable subset of the dataset represented by the ReportName. A sessionId or CachedReportConfiguration id can be used here. If a sessionId is specified, Filter, Select, and OrderBy are applied to the data represented by the sessionId. Filter, Select, and OrderBy cannot be specified together with a CachedReportConfiguration id. The maximum length allowed for this property is 128 characters."
            },
            "status": {
              "$ref": "#/$defs/microsoft.graph.deviceManagementReportStatus"
            },
            "url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Temporary location of the exported report."
            },
            "@odata.type": {
              "type": "string"
            }
          },
          "description": "Entity representing a job to export a report."
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.deviceManagementExportJob"
    },
    "microsoft.graph.deviceManagementExportJobLocalizationType": {
      "title": "deviceManagementExportJobLocalizationType",
      "enum": [
        "localizedValuesAsAdditionalColumn",
        "replaceLocalizableValues"
      ],
      "type": "string",
      "description": "Configures how the requested export job is localized.",
      "x-ms-enum": {
        "name": "deviceManagementExportJobLocalizationType",
        "modelAsString": false,
        "values": [
          {
            "value": "localizedValuesAsAdditionalColumn",
            "description": "Configures the export job to expose localized values as an additional column.",
            "name": "localizedValuesAsAdditionalColumn"
          },
          {
            "value": "replaceLocalizableValues",
            "description": "Configures the export job to replace enumerable values with their localized values.",
            "name": "replaceLocalizableValues"
          }
        ]
      }
    },
    "microsoft.graph.deviceManagementReportFileFormat": {
      "title": "deviceManagementReportFileFormat",
      "enum": [
        "csv",
        "pdf",
        "json",
        "unknownFutureValue"
      ],
      "type": "string",
      "description": "Possible values for the file format of a report to be exported.",
      "x-ms-enum": {
        "name": "deviceManagementReportFileFormat",
        "modelAsString": false,
        "values": [
          {
            "value": "csv",
            "description": "CSV Format.",
            "name": "csv"
          },
          {
            "value": "pdf",
            "description": "PDF Format (Deprecate later).",
            "name": "pdf"
          },
          {
            "value": "json",
            "description": "JSON Format.",
            "name": "json"
          },
          {
            "value": "unknownFutureValue",
            "description": "Evolvable enumeration sentinel value. Do not use.",
            "name": "unknownFutureValue"
          }
        ]
      }
    },
    "microsoft.graph.deviceManagementReportStatus": {
      "title": "deviceManagementReportStatus",
      "enum": [
        "unknown",
        "notStarted",
        "inProgress",
        "completed",
        "failed"
      ],
      "type": "string",
      "description": "Possible statuses associated with a generated report.",
      "x-ms-enum": {
        "name": "deviceManagementReportStatus",
        "modelAsString": false,
        "values": [
          {
            "value": "unknown",
            "description": "Report generation status is unknown.",
            "name": "unknown"
          },
          {
            "value": "notStarted",
            "description": "Report generation has not started.",
            "name": "notStarted"
          },
          {
            "value": "inProgress",
            "description": "Report generation is in progress.",
            "name": "inProgress"
          },
          {
            "value": "completed",
            "description": "Report generation is completed.",
            "name": "completed"
          },
          {
            "value": "failed",
            "description": "Report generation has failed.",
            "name": "failed"
          }
        ]
      }
    },
    "microsoft.graph.entity": {
      "title": "entity",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  }
}