Backblaze · JSON Structure

B2 Native Api Create Bucket Request Structure

CreateBucketRequest schema from Backblaze B2 Native API

Type: object Properties: 6 Required: 3
Cloud StorageObject StorageStorageBackup

CreateBucketRequest is a JSON Structure definition published by Backblaze, describing 6 properties, of which 3 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

accountId bucketName bucketType bucketInfo corsRules lifecycleRules

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/backblaze/refs/heads/main/json-structure/b2-native-api-create-bucket-request-structure.json",
  "name": "CreateBucketRequest",
  "description": "CreateBucketRequest schema from Backblaze B2 Native API",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "The account ID",
      "example": "abc123def456"
    },
    "bucketName": {
      "type": "string",
      "description": "The name of the new bucket",
      "example": "my-media-bucket"
    },
    "bucketType": {
      "type": "string",
      "enum": [
        "allPublic",
        "allPrivate"
      ],
      "description": "Privacy setting for the bucket",
      "example": "allPrivate"
    },
    "bucketInfo": {
      "type": "object",
      "description": "User-defined info to store with the bucket"
    },
    "corsRules": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "CORS rules for the bucket"
    },
    "lifecycleRules": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Lifecycle rules for the bucket"
    }
  },
  "required": [
    "accountId",
    "bucketName",
    "bucketType"
  ]
}