Backblaze · Arazzo Workflow

Backblaze Tear Down a Bucket

Version 1.0.0

Authorize, list a bucket's file names, delete the first file version, then delete the empty bucket.

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

Provider

backblaze

Workflows

teardown-bucket
Empty a file from a bucket and then delete the bucket.
Authorizes the account, lists the bucket's files and deletes the first file version found, then deletes the bucket itself.
4 steps inputs: bucketId outputs: deletedBucketId, deletedFileId
1
authorize
Log in to the B2 API to obtain the accountId and authorization token.
2
listFiles
List the file names in the bucket to find a version to remove.
3
deleteFile
Delete the first file version found so the bucket moves toward an empty state.
4
deleteBucket
Delete the bucket. This succeeds only when the bucket no longer contains any file versions.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Backblaze Tear Down a Bucket
  summary: Authorize, list a bucket's file names, delete the first file version, then delete the empty bucket.
  description: >-
    A decommissioning chain that empties and removes a bucket. A bucket can only
    be deleted once it contains no file versions, so the flow authorizes the
    account, lists the file names in the bucket, deletes the first file version
    when one exists, and then deletes the now-emptier bucket. The accountId from
    authorize is required by the delete-bucket call, and the first listed file's
    name and id feed the delete-file-version call. For buckets holding many
    files this single-pass flow would be run repeatedly until the listing is
    empty. 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: bucketsApi
  url: ../openapi/backblaze-buckets-api-openapi.yml
  type: openapi
- name: filesApi
  url: ../openapi/backblaze-files-api-openapi.yml
  type: openapi
workflows:
- workflowId: teardown-bucket
  summary: Empty a file from a bucket and then delete the bucket.
  description: >-
    Authorizes the account, lists the bucket's files and deletes the first file
    version found, then deletes the bucket itself.
  inputs:
    type: object
    required:
    - bucketId
    properties:
      bucketId:
        type: string
        description: The bucket to empty and delete.
  steps:
  - stepId: authorize
    description: Log in to the B2 API to obtain the accountId and authorization token.
    operationId: authorizeAccount
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      accountId: $response.body#/accountId
      authorizationToken: $response.body#/authorizationToken
  - stepId: listFiles
    description: List the file names in the bucket to find a version to remove.
    operationId: listFileNames
    requestBody:
      contentType: application/json
      payload:
        bucketId: $inputs.bucketId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      files: $response.body#/files
      firstFileId: $response.body#/files/0/fileId
      firstFileName: $response.body#/files/0/fileName
    onSuccess:
    - name: hasFiles
      type: goto
      stepId: deleteFile
      criteria:
      - context: $response.body
        condition: $.files.length > 0
        type: jsonpath
    - name: alreadyEmpty
      type: goto
      stepId: deleteBucket
      criteria:
      - context: $response.body
        condition: $.files.length == 0
        type: jsonpath
  - stepId: deleteFile
    description: >-
      Delete the first file version found so the bucket moves toward an empty
      state.
    operationId: deleteFileVersion
    requestBody:
      contentType: application/json
      payload:
        fileName: $steps.listFiles.outputs.firstFileName
        fileId: $steps.listFiles.outputs.firstFileId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deletedFileId: $response.body#/fileId
  - stepId: deleteBucket
    description: >-
      Delete the bucket. This succeeds only when the bucket no longer contains
      any file versions.
    operationId: deleteBucket
    requestBody:
      contentType: application/json
      payload:
        accountId: $steps.authorize.outputs.accountId
        bucketId: $inputs.bucketId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deletedBucketId: $response.body#/bucketId
      deletedBucketName: $response.body#/bucketName
  outputs:
    deletedFileId: $steps.deleteFile.outputs.deletedFileId
    deletedBucketId: $steps.deleteBucket.outputs.deletedBucketId

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-teardown-bucket-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.