Zum Inhalt
Für Agenten

drive_changes

Track Drive changes

Markdown Tools als JSON

Beschreibung

Reads ordered file and folder changes in a Drive since a persistent cursor. Includes create, content update, rename, move, delete and restore (create with the original ID). Start with cursor 0; persist the returned cursor only after processing the page. While has_more is true, request another page with that cursor. Cursors belong to one Drive. This is polling, not a subscription. Use drive_activity for human activity/actors instead. Returns metadata only, never file contents, storage keys or signed URLs.

Zugriff

Zugriffsprofil: gated. Module: files. Die Freigabe im Profil ersetzt keine Account-, Workspace- oder Rollenberechtigung.

Parameter

Name Typ Pflicht Beschreibung
account_id string Ja Account prefix ID (acct_…).
drive_id string Ja Drive prefix ID (drv_…).
cursor integer Nein Last successfully processed cursor for this Drive; default 0.
limit integer Nein Page size; default 100, maximum 500.

Eingabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "account_id": {
      "type": "string",
      "description": "Account prefix ID (acct_…)."
    },
    "drive_id": {
      "type": "string",
      "description": "Drive prefix ID (drv_…)."
    },
    "cursor": {
      "type": "integer",
      "minimum": 0,
      "description": "Last successfully processed cursor for this Drive; default 0."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "description": "Page size; default 100, maximum 500."
    }
  },
  "required": [
    "account_id",
    "drive_id"
  ],
  "type": "object"
}

Ausgabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "drive_id": {
      "type": "string"
    },
    "cursor": {
      "type": "integer"
    },
    "has_more": {
      "type": "boolean"
    },
    "changes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sequence": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "file",
              "folder"
            ]
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "operation": {
            "type": "string",
            "enum": [
              "create",
              "update",
              "delete",
              "move",
              "rename"
            ]
          },
          "deleted": {
            "type": "boolean"
          },
          "size": {
            "type": "integer"
          },
          "content_version": {
            "type": "string"
          }
        },
        "required": [
          "sequence",
          "id",
          "kind",
          "parent_id",
          "name",
          "version",
          "operation",
          "deleted"
        ]
      }
    }
  },
  "required": [
    "drive_id",
    "cursor",
    "has_more",
    "changes"
  ],
  "type": "object"
}
Seiten