Zum Inhalt
Für Agenten

drive_folder_save

Create or Update Folder

Markdown Tools als JSON

Beschreibung

Linear-style upsert. Omit id to create a new folder in the given drive; pass id (dfo_…) to rename or move an existing one. parent_id picks the destination folder (omit for root).

Access: create requires editor+ on the drive; update requires editor+ AND same-drive parent (Pundit DriveFolderPolicy).

Zugriff

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

Parameter

Name Typ Pflicht Beschreibung
account_id string Ja
drive_id string Nein Drive prefix ID. Required on create; ignored on update (folder's drive is fixed).
id string Nein Folder prefix ID (dfo_…). Omit to create.
name string Nein
parent_id string / null Nein Parent folder prefix ID (dfo_…). Pass null to move to root.

Eingabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "account_id": {
      "type": "string"
    },
    "drive_id": {
      "type": "string",
      "description": "Drive prefix ID. Required on create; ignored on update (folder's drive is fixed)."
    },
    "id": {
      "type": "string",
      "description": "Folder prefix ID (dfo_…). Omit to create."
    },
    "name": {
      "type": "string",
      "maxLength": 200
    },
    "parent_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Parent folder prefix ID (dfo_…). Pass null to move to root."
    }
  },
  "required": [
    "account_id"
  ],
  "type": "object"
}

Ausgabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "parent_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "drive_id": {
      "type": "string"
    },
    "created": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "parent_id",
    "drive_id",
    "created"
  ],
  "type": "object"
}
Seiten