arazzo: 1.0.1 info: title: Databricks Inspect and Recursively Delete a Directory summary: List a workspace directory's contents, then recursively delete it. description: >- Audits a Databricks workspace directory by listing its objects so callers can capture what will be removed, and then recursively deletes the directory and all of its contents in a single cleanup pass. The directory path drives both the listing and the recursive delete. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: databricksApi url: ../openapi/databricks-openapi.yml type: openapi workflows: - workflowId: cleanup-workspace-directory summary: List a directory's contents and recursively delete it. description: >- Lists the directory contents for an audit record, then issues a recursive delete to remove the directory and everything inside it. inputs: type: object required: - path properties: path: type: string description: The absolute directory path to inspect and delete. steps: - stepId: listContents description: >- List the objects contained in the directory so the caller has a record of what is about to be deleted. operationId: listWorkspaceObjects parameters: - name: path in: query value: $inputs.path successCriteria: - condition: $statusCode == 200 outputs: objects: $response.body#/objects - stepId: deleteDirectory description: >- Recursively delete the directory and all of its contents. operationId: deleteWorkspaceObject requestBody: contentType: application/json payload: path: $inputs.path recursive: true successCriteria: - condition: $statusCode == 200 outputs: deletedPath: $inputs.path deletedObjects: $steps.listContents.outputs.objects