Backblaze · JSON Structure

B2 Native Api File Info Structure

Information about a stored file

Type: object Properties: 10
Cloud StorageObject StorageStorageBackup

FileInfo is a JSON Structure definition published by Backblaze, describing 10 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

fileId fileName accountId bucketId contentLength contentSha1 contentType fileInfo action uploadTimestamp

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-file-info-structure.json",
  "name": "FileInfo",
  "description": "Information about a stored file",
  "type": "object",
  "properties": {
    "fileId": {
      "type": "string",
      "description": "The unique identifier for this version of this file",
      "example": "4_h4a48fe8875c6214145260818"
    },
    "fileName": {
      "type": "string",
      "description": "The name of the file",
      "example": "photos/image.jpg"
    },
    "accountId": {
      "type": "string",
      "description": "The account that owns the file",
      "example": "abc123def456"
    },
    "bucketId": {
      "type": "string",
      "description": "The bucket that the file is in",
      "example": "e73ede9969c64355ef8b"
    },
    "contentLength": {
      "type": "int32",
      "description": "The size of the file in bytes",
      "example": 102400
    },
    "contentSha1": {
      "type": "string",
      "description": "The SHA1 checksum of the bytes in the file",
      "example": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
    },
    "contentType": {
      "type": "string",
      "description": "The MIME type of the file",
      "example": "image/jpeg"
    },
    "fileInfo": {
      "type": "object",
      "description": "Custom information about the file"
    },
    "action": {
      "type": "string",
      "enum": [
        "upload",
        "hide",
        "start",
        "copy"
      ],
      "description": "The action that created this file version",
      "example": "upload"
    },
    "uploadTimestamp": {
      "type": "int32",
      "description": "Milliseconds since midnight, January 1, 1970 UTC",
      "example": 1660000000000
    }
  }
}