naftiko: 1.0.0-alpha2 info: label: Backblaze B2 Native API — Files description: 'Backblaze B2 Native API — Files. 10 operations. Lead operation: Backblaze B2 Native API Copy File. Self-contained Naftiko capability covering one Backblaze business surface.' tags: - Backblaze - Files created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: BACKBLAZE_API_KEY: BACKBLAZE_API_KEY capability: consumes: - type: http namespace: b2-native-files baseUri: https://api.backblazeb2.com description: Backblaze B2 Native API — Files business capability. Self-contained, no shared references. resources: - name: b2api-v4-b2_copy_file path: /b2api/v4/b2_copy_file operations: - name: copyfile method: POST description: Backblaze B2 Native API Copy File outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: b2api-v4-b2_delete_file_version path: /b2api/v4/b2_delete_file_version operations: - name: deletefileversion method: POST description: Backblaze B2 Native API Delete File Version outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: b2api-v4-b2_download_file_by_id path: /b2api/v4/b2_download_file_by_id operations: - name: downloadfilebyid method: GET description: Backblaze B2 Native API Download File by ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: fileId in: query type: string description: The unique file ID to download required: true - name: b2api-v4-b2_download_file_by_name-bucketName-fileName path: /b2api/v4/b2_download_file_by_name/{bucketName}/{fileName} operations: - name: downloadfilebyname method: GET description: Backblaze B2 Native API Download File by Name outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: bucketName in: path type: string description: Name of the bucket containing the file required: true - name: fileName in: path type: string description: Full name of the file including any prefix required: true - name: b2api-v4-b2_get_file_info path: /b2api/v4/b2_get_file_info operations: - name: getfileinfo method: POST description: Backblaze B2 Native API Get File Info outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: b2api-v4-b2_get_upload_url path: /b2api/v4/b2_get_upload_url operations: - name: getuploadurl method: POST description: Backblaze B2 Native API Get Upload URL outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: b2api-v4-b2_hide_file path: /b2api/v4/b2_hide_file operations: - name: hidefile method: POST description: Backblaze B2 Native API Hide File outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: b2api-v4-b2_list_file_names path: /b2api/v4/b2_list_file_names operations: - name: listfilenames method: POST description: Backblaze B2 Native API List File Names outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: b2api-v4-b2_list_file_versions path: /b2api/v4/b2_list_file_versions operations: - name: listfileversions method: POST description: Backblaze B2 Native API List File Versions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: b2api-v4-b2_upload_file path: /b2api/v4/b2_upload_file operations: - name: uploadfile method: POST description: Backblaze B2 Native API Upload File outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Authorization in: header type: string description: Upload authorization token from b2_get_upload_url required: true - name: X-Bz-File-Name in: header type: string description: URL-encoded name of the file required: true - name: Content-Type in: header type: string description: MIME type of the file required: true - name: Content-Length in: header type: integer description: Length of the file in bytes required: true - name: X-Bz-Content-Sha1 in: header type: string description: SHA1 checksum of the file content required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.BACKBLAZE_API_KEY}}' exposes: - type: rest namespace: b2-native-files-rest port: 8080 description: REST adapter for Backblaze B2 Native API — Files. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/b2api/v4/b2-copy-file name: b2api-v4-b2-copy-file description: REST surface for b2api-v4-b2_copy_file. operations: - method: POST name: copyfile description: Backblaze B2 Native API Copy File call: b2-native-files.copyfile with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-delete-file-version name: b2api-v4-b2-delete-file-version description: REST surface for b2api-v4-b2_delete_file_version. operations: - method: POST name: deletefileversion description: Backblaze B2 Native API Delete File Version call: b2-native-files.deletefileversion with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-download-file-by-id name: b2api-v4-b2-download-file-by-id description: REST surface for b2api-v4-b2_download_file_by_id. operations: - method: GET name: downloadfilebyid description: Backblaze B2 Native API Download File by ID call: b2-native-files.downloadfilebyid with: fileId: rest.fileId outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-download-file-by-name/{bucketname}/{filename} name: b2api-v4-b2-download-file-by-name-bucketname-filename description: REST surface for b2api-v4-b2_download_file_by_name-bucketName-fileName. operations: - method: GET name: downloadfilebyname description: Backblaze B2 Native API Download File by Name call: b2-native-files.downloadfilebyname with: bucketName: rest.bucketName fileName: rest.fileName outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-get-file-info name: b2api-v4-b2-get-file-info description: REST surface for b2api-v4-b2_get_file_info. operations: - method: POST name: getfileinfo description: Backblaze B2 Native API Get File Info call: b2-native-files.getfileinfo with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-get-upload-url name: b2api-v4-b2-get-upload-url description: REST surface for b2api-v4-b2_get_upload_url. operations: - method: POST name: getuploadurl description: Backblaze B2 Native API Get Upload URL call: b2-native-files.getuploadurl with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-hide-file name: b2api-v4-b2-hide-file description: REST surface for b2api-v4-b2_hide_file. operations: - method: POST name: hidefile description: Backblaze B2 Native API Hide File call: b2-native-files.hidefile with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-list-file-names name: b2api-v4-b2-list-file-names description: REST surface for b2api-v4-b2_list_file_names. operations: - method: POST name: listfilenames description: Backblaze B2 Native API List File Names call: b2-native-files.listfilenames with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-list-file-versions name: b2api-v4-b2-list-file-versions description: REST surface for b2api-v4-b2_list_file_versions. operations: - method: POST name: listfileversions description: Backblaze B2 Native API List File Versions call: b2-native-files.listfileversions with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/b2api/v4/b2-upload-file name: b2api-v4-b2-upload-file description: REST surface for b2api-v4-b2_upload_file. operations: - method: POST name: uploadfile description: Backblaze B2 Native API Upload File call: b2-native-files.uploadfile with: Authorization: rest.Authorization X-Bz-File-Name: rest.X-Bz-File-Name Content-Type: rest.Content-Type Content-Length: rest.Content-Length X-Bz-Content-Sha1: rest.X-Bz-Content-Sha1 body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: b2-native-files-mcp port: 9090 transport: http description: MCP adapter for Backblaze B2 Native API — Files. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: backblaze-b2-native-api-copy description: Backblaze B2 Native API Copy File hints: readOnly: false destructive: false idempotent: false call: b2-native-files.copyfile with: body: tools.body outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-delete description: Backblaze B2 Native API Delete File Version hints: readOnly: false destructive: false idempotent: false call: b2-native-files.deletefileversion with: body: tools.body outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-download description: Backblaze B2 Native API Download File by ID hints: readOnly: true destructive: false idempotent: true call: b2-native-files.downloadfilebyid with: fileId: tools.fileId outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-download-2 description: Backblaze B2 Native API Download File by Name hints: readOnly: true destructive: false idempotent: true call: b2-native-files.downloadfilebyname with: bucketName: tools.bucketName fileName: tools.fileName outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-get description: Backblaze B2 Native API Get File Info hints: readOnly: true destructive: false idempotent: false call: b2-native-files.getfileinfo with: body: tools.body outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-get-2 description: Backblaze B2 Native API Get Upload URL hints: readOnly: true destructive: false idempotent: false call: b2-native-files.getuploadurl with: body: tools.body outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-hide description: Backblaze B2 Native API Hide File hints: readOnly: false destructive: false idempotent: false call: b2-native-files.hidefile with: body: tools.body outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-list description: Backblaze B2 Native API List File Names hints: readOnly: true destructive: false idempotent: false call: b2-native-files.listfilenames with: body: tools.body outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-list-2 description: Backblaze B2 Native API List File Versions hints: readOnly: true destructive: false idempotent: false call: b2-native-files.listfileversions with: body: tools.body outputParameters: - type: object mapping: $. - name: backblaze-b2-native-api-upload description: Backblaze B2 Native API Upload File hints: readOnly: false destructive: false idempotent: false call: b2-native-files.uploadfile with: Authorization: tools.Authorization X-Bz-File-Name: tools.X-Bz-File-Name Content-Type: tools.Content-Type Content-Length: tools.Content-Length X-Bz-Content-Sha1: tools.X-Bz-Content-Sha1 body: tools.body outputParameters: - type: object mapping: $.