Backblaze · Arazzo Workflow

Backblaze Browse Bucket Files

Version 1.0.0

Authorize, list buckets, list the file names in a bucket, then fetch full info for the first file.

1 workflow 1 source API 1 provider
View Spec View on GitHub Cloud StorageObject StorageStorageBackupArazzoWorkflows

Provider

backblaze

Workflows

browse-bucket-files
List buckets, list a bucket's files, and inspect the first file.
Authorizes the account, enumerates buckets and the files in a target bucket, then fetches full information for the first file found.
4 steps inputs: bucketId, maxFileCount outputs: buckets, files, inspectedFileId
1
authorize
authorizeAccount
Log in to the B2 API to obtain the accountId and authorization token.
2
listBuckets
listBuckets
List the buckets owned by the authorized account.
3
listFileNames
listFileNames
List the file names contained in the target bucket, returning at most the requested number of files.
4
getFileInfo
getFileInfo
Fetch the full metadata for the first file returned by the listing using its fileId.

Source API Descriptions

Arazzo Workflow Specification

backblaze-browse-bucket-files-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Backblaze Browse Bucket Files
  summary: Authorize, list buckets, list the file names in a bucket, then fetch full info for the first file.
  description: >-
    A read-only discovery chain for navigating account storage. It authorizes
    the account, lists the buckets owned by that account, lists the file names
    inside the chosen bucket, and then retrieves the full metadata for the first
    file returned. The fileId of the first listed file flows into the
    get-file-info call so the deepest detail is fetched without any manual
    identifier handling. 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: backblazeB2
  url: ../openapi/backblaze-b2-native-api.yaml
  type: openapi
workflows:
- workflowId: browse-bucket-files
  summary: List buckets, list a bucket's files, and inspect the first file.
  description: >-
    Authorizes the account, enumerates buckets and the files in a target
    bucket, then fetches full information for the first file found.
  inputs:
    type: object
    required:
    - bucketId
    properties:
      bucketId:
        type: string
        description: The bucket whose file names should be listed.
      maxFileCount:
        type: integer
        description: Maximum number of file names to return (1-10000).
  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: listBuckets
    description: List the buckets owned by the authorized account.
    operationId: listBuckets
    requestBody:
      contentType: application/json
      payload:
        accountId: $steps.authorize.outputs.accountId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      buckets: $response.body#/buckets
  - stepId: listFileNames
    description: >-
      List the file names contained in the target bucket, returning at most the
      requested number of files.
    operationId: listFileNames
    requestBody:
      contentType: application/json
      payload:
        bucketId: $inputs.bucketId
        maxFileCount: $inputs.maxFileCount
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      files: $response.body#/files
      firstFileId: $response.body#/files/0/fileId
    onSuccess:
    - name: filesFound
      type: goto
      stepId: getFileInfo
      criteria:
      - context: $response.body
        condition: $.files.length > 0
        type: jsonpath
  - stepId: getFileInfo
    description: >-
      Fetch the full metadata for the first file returned by the listing using
      its fileId.
    operationId: getFileInfo
    requestBody:
      contentType: application/json
      payload:
        fileId: $steps.listFileNames.outputs.firstFileId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      fileId: $response.body#/fileId
      fileName: $response.body#/fileName
      contentLength: $response.body#/contentLength
      contentType: $response.body#/contentType
  outputs:
    buckets: $steps.listBuckets.outputs.buckets
    files: $steps.listFileNames.outputs.files
    inspectedFileId: $steps.getFileInfo.outputs.fileId