{
  "swagger": "2.0",
  "info": {
    "title": "Zetaleap Cloud Drive",
    "description": "Browse folders, inspect cloud files, and create structured project directories in Zetaleap Drive directly from Microsoft Power Automate workflows.",
    "version": "1.0.0",
    "contact": {
      "name": "Zetaleap Support Team",
      "url": "https://zetaleap.com/#contact",
      "email": "support_team@zetaleap.com"
    }
  },
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://zetaleap.com"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://zetaleap.com/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "Data;Productivity"
    }
  ],
  "host": "test.zetaleap.com",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "api_key": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Enter your Zetaleap Personal Access Token prefixed with Bearer (example: Bearer zl_your_api_token). Generate tokens free at https://zetaleap.com/profile."
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/api/drive/items": {
      "get": {
        "tags": [
          "Cloud Drive"
        ],
        "operationId": "ListDriveItems",
        "summary": "List folders and files in Zetaleap Drive",
        "description": "Lists folders and stored files inside Zetaleap Drive Cloud Vault.",
        "x-ms-visibility": "important",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "query",
            "type": "string",
            "required": false,
            "x-ms-summary": "Parent Folder ID (Optional)",
            "description": "Leave empty to list root Drive items, or pass a folder ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Drive folders and files",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "folders": {
                  "type": "array",
                  "x-ms-summary": "Folders",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int32",
                        "x-ms-summary": "Folder ID"
                      },
                      "name": {
                        "type": "string",
                        "x-ms-summary": "Folder Name"
                      }
                    }
                  }
                },
                "files": {
                  "type": "array",
                  "x-ms-summary": "Files",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int32",
                        "x-ms-summary": "File ID"
                      },
                      "name": {
                        "type": "string",
                        "x-ms-summary": "File Name"
                      },
                      "mime_type": {
                        "type": "string",
                        "x-ms-summary": "MIME Type"
                      },
                      "size_bytes": {
                        "type": "integer",
                        "format": "int64",
                        "x-ms-summary": "Size in Bytes"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/drive/folders": {
      "post": {
        "tags": [
          "Cloud Drive"
        ],
        "operationId": "CreateDriveFolder",
        "summary": "Create a folder in Zetaleap Drive",
        "description": "Creates a new organized folder inside Zetaleap Drive Cloud Vault.",
        "x-ms-visibility": "important",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "x-ms-summary": "New Folder Details",
            "schema": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "x-ms-summary": "Folder Name"
                },
                "color": {
                  "type": "string",
                  "default": "#3b82f6",
                  "x-ms-summary": "Folder Hex Color"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Created folder response",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                }
              }
            }
          }
        }
      }
    }
  }
}