Backblaze · Arazzo Workflow

Backblaze Purge a File's Versions

Version 1.0.0

Authorize, list a file's versions by prefix, then delete the most recent version found.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Cloud StorageObject StorageStorageBackupArazzoWorkflows

Provider

backblaze

Workflows

purge-file-versions
Find a file version by prefix and delete it.
Authorizes the account, lists file versions in a bucket filtered by prefix, and deletes the first matching version using its fileName and fileId.
3 steps inputs: bucketId, prefix outputs: deletedFileId, versions
1
authorize
Log in to the B2 API to obtain the authorization token.
2
listVersions
List the file versions in the bucket matching the supplied prefix, newest version first.
3
deleteVersion
Delete the most recent version found, supplying both the fileName and fileId as the delete endpoint requires.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Backblaze Purge a File's Versions
  summary: Authorize, list a file's versions by prefix, then delete the most recent version found.
  description: >-
    A targeted deletion chain for removing stored file versions. The account is
    authorized, b2_list_file_versions enumerates the versions matching a file
    name prefix, and when a version is found the workflow deletes it with
    b2_delete_file_version using both the fileName and fileId, which the delete
    endpoint requires together. The first listed version's name and id flow into
    the delete call. 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: authorizationApi
  url: ../openapi/backblaze-authorization-api-openapi.yml
  type: openapi
- name: filesApi
  url: ../openapi/backblaze-files-api-openapi.yml
  type: openapi
workflows:
- workflowId: purge-file-versions
  summary: Find a file version by prefix and delete it.
  description: >-
    Authorizes the account, lists file versions in a bucket filtered by prefix,
    and deletes the first matching version using its fileName and fileId.
  inputs:
    type: object
    required:
    - bucketId
    - prefix
    properties:
      bucketId:
        type: string
        description: The bucket containing the file versions.
      prefix:
        type: string
        description: File name prefix used to locate the version to delete.
  steps:
  - stepId: authorize
    description: Log in to the B2 API to obtain the authorization token.
    operationId: authorizeAccount
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      authorizationToken: $response.body#/authorizationToken
  - stepId: listVersions
    description: >-
      List the file versions in the bucket matching the supplied prefix, newest
      version first.
    operationId: listFileVersions
    requestBody:
      contentType: application/json
      payload:
        bucketId: $inputs.bucketId
        prefix: $inputs.prefix
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      files: $response.body#/files
      targetFileId: $response.body#/files/0/fileId
      targetFileName: $response.body#/files/0/fileName
    onSuccess:
    - name: versionFound
      type: goto
      stepId: deleteVersion
      criteria:
      - context: $response.body
        condition: $.files.length > 0
        type: jsonpath
  - stepId: deleteVersion
    description: >-
      Delete the most recent version found, supplying both the fileName and
      fileId as the delete endpoint requires.
    operationId: deleteFileVersion
    requestBody:
      contentType: application/json
      payload:
        fileName: $steps.listVersions.outputs.targetFileName
        fileId: $steps.listVersions.outputs.targetFileId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deletedFileId: $response.body#/fileId
      deletedFileName: $response.body#/fileName
  outputs:
    versions: $steps.listVersions.outputs.files
    deletedFileId: $steps.deleteVersion.outputs.deletedFileId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/backblaze-purge-file-versions-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.