naftiko: 1.0.0-alpha2 info: label: OpenStorage SDK — OpenStorageFilesystemDefrag description: 'OpenStorage SDK — OpenStorageFilesystemDefrag. 4 operations. Lead operation: Create a schedule to run defragmentation tasks periodically. Self-contained Naftiko capability covering one Portworx business surface.' tags: - Portworx - OpenStorageFilesystemDefrag created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PORTWORX_API_KEY: PORTWORX_API_KEY capability: consumes: - type: http namespace: portworx-openstoragefilesystemdefrag baseUri: '' description: OpenStorage SDK — OpenStorageFilesystemDefrag business capability. Self-contained, no shared references. resources: - name: v1-filesystem-defrag-schedule path: /v1/filesystem-defrag/schedule operations: - name: openstoragefilesystemdefragcreateschedule method: POST description: Create a schedule to run defragmentation tasks periodically outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: v1-filesystem-defrag-schedules path: /v1/filesystem-defrag/schedules operations: - name: openstoragefilesystemdefragcleanupschedules method: DELETE description: Clean up all defrag schedules and stop all operations outputRawFormat: json outputParameters: - name: result type: object value: $. - name: v1-filesystem-defrag-status path: /v1/filesystem-defrag/status operations: - name: openstoragefilesystemdefragenumeratenodestatus method: GET description: Enumerate all nodes, returning defrag status of the entire cluster outputRawFormat: json outputParameters: - name: result type: object value: $. - name: v1-filesystem-defrag-status-node_id path: /v1/filesystem-defrag/status/{node_id} operations: - name: openstoragefilesystemdefraggetnodestatus method: GET description: Get defrag status of a node outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: node_id in: path type: string description: NodeId is uuid of the node required: true authentication: type: bearer token: '{{env.PORTWORX_API_KEY}}' exposes: - type: rest namespace: portworx-openstoragefilesystemdefrag-rest port: 8080 description: REST adapter for OpenStorage SDK — OpenStorageFilesystemDefrag. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/filesystem-defrag/schedule name: v1-filesystem-defrag-schedule description: REST surface for v1-filesystem-defrag-schedule. operations: - method: POST name: openstoragefilesystemdefragcreateschedule description: Create a schedule to run defragmentation tasks periodically call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefragcreateschedule with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/filesystem-defrag/schedules name: v1-filesystem-defrag-schedules description: REST surface for v1-filesystem-defrag-schedules. operations: - method: DELETE name: openstoragefilesystemdefragcleanupschedules description: Clean up all defrag schedules and stop all operations call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefragcleanupschedules outputParameters: - type: object mapping: $. - path: /v1/v1/filesystem-defrag/status name: v1-filesystem-defrag-status description: REST surface for v1-filesystem-defrag-status. operations: - method: GET name: openstoragefilesystemdefragenumeratenodestatus description: Enumerate all nodes, returning defrag status of the entire cluster call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefragenumeratenodestatus outputParameters: - type: object mapping: $. - path: /v1/v1/filesystem-defrag/status/{node-id} name: v1-filesystem-defrag-status-node-id description: REST surface for v1-filesystem-defrag-status-node_id. operations: - method: GET name: openstoragefilesystemdefraggetnodestatus description: Get defrag status of a node call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefraggetnodestatus with: node_id: rest.node_id outputParameters: - type: object mapping: $. - type: mcp namespace: portworx-openstoragefilesystemdefrag-mcp port: 9090 transport: http description: MCP adapter for OpenStorage SDK — OpenStorageFilesystemDefrag. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-schedule-run-defragmentation-tasks description: Create a schedule to run defragmentation tasks periodically hints: readOnly: false destructive: false idempotent: false call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefragcreateschedule with: body: tools.body outputParameters: - type: object mapping: $. - name: clean-up-all-defrag-schedules description: Clean up all defrag schedules and stop all operations hints: readOnly: false destructive: true idempotent: true call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefragcleanupschedules outputParameters: - type: object mapping: $. - name: enumerate-all-nodes-returning-defrag description: Enumerate all nodes, returning defrag status of the entire cluster hints: readOnly: true destructive: false idempotent: true call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefragenumeratenodestatus outputParameters: - type: object mapping: $. - name: get-defrag-status-node description: Get defrag status of a node hints: readOnly: true destructive: false idempotent: true call: portworx-openstoragefilesystemdefrag.openstoragefilesystemdefraggetnodestatus with: node_id: tools.node_id outputParameters: - type: object mapping: $.