Microsoft Word · Schema

DriveItem

Represents a file, folder, or other item stored in a drive.

DocumentsMicrosoft 365OfficeProductivityWord Processing

Properties

Name Type Description
id string The unique identifier of the item within the drive.
name string The name of the item (filename and extension).
description string A user-visible description of the item.
size integer Size of the item in bytes.
webUrl string URL that displays the resource in the browser.
webDavUrl string WebDAV compatible URL for the item.
createdDateTime string Date and time of item creation.
lastModifiedDateTime string Date and time the item was last modified.
eTag string ETag for the entire item.
cTag string ETag for the content of the item.
createdBy object
lastModifiedBy object
parentReference object
file object
folder object
View JSON Schema on GitHub

JSON Schema

graph-api-drive-item-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/graph-api-drive-item-schema.json",
  "title": "DriveItem",
  "description": "Represents a file, folder, or other item stored in a drive.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the item within the drive."
    },
    "name": {
      "type": "string",
      "description": "The name of the item (filename and extension)."
    },
    "description": {
      "type": "string",
      "description": "A user-visible description of the item."
    },
    "size": {
      "type": "integer",
      "format": "int64",
      "description": "Size of the item in bytes."
    },
    "webUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL that displays the resource in the browser."
    },
    "webDavUrl": {
      "type": "string",
      "format": "uri",
      "description": "WebDAV compatible URL for the item."
    },
    "createdDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time of item creation."
    },
    "lastModifiedDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time the item was last modified."
    },
    "eTag": {
      "type": "string",
      "description": "ETag for the entire item."
    },
    "cTag": {
      "type": "string",
      "description": "ETag for the content of the item."
    },
    "createdBy": {
      "$ref": "#/$defs/IdentitySet"
    },
    "lastModifiedBy": {
      "$ref": "#/$defs/IdentitySet"
    },
    "parentReference": {
      "$ref": "#/$defs/ItemReference"
    },
    "file": {
      "$ref": "#/$defs/FileFacet"
    },
    "folder": {
      "$ref": "#/$defs/FolderFacet"
    }
  },
  "$defs": {
    "IdentitySet": {
      "type": "object",
      "description": "Keyed collection of identity resources.",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": { "type": "string" },
            "displayName": { "type": "string" }
          }
        }
      }
    },
    "ItemReference": {
      "type": "object",
      "description": "Reference to a drive item's parent.",
      "properties": {
        "driveId": { "type": "string" },
        "id": { "type": "string" },
        "path": { "type": "string" }
      }
    },
    "FileFacet": {
      "type": "object",
      "description": "File metadata facet.",
      "properties": {
        "mimeType": { "type": "string" },
        "hashes": {
          "type": "object",
          "properties": {
            "sha1Hash": { "type": "string" },
            "quickXorHash": { "type": "string" }
          }
        }
      }
    },
    "FolderFacet": {
      "type": "object",
      "description": "Folder metadata facet.",
      "properties": {
        "childCount": { "type": "integer" }
      }
    }
  }
}