{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-media-asset-detail-schema.json",
  "title": "MediaAssetDetail",
  "description": "One media asset, as GET /v1/media/{id} returns it.",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brixsignage-com-openapi.json#/components/schemas/MediaAssetDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Media asset id."
    },
    "spaceId": {
      "type": "string",
      "description": "Workspace id."
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "Media kind: image, video, audio, pdf, powerpoint, web, dashboard, weather, rss, clock, qr, menu, directory, donor-wall, hall-of-fame, birthday-board, recognition, wayfinding, check-in, emergency, touch-kiosk, package, font. Free text in storage, so a very old row may carry another value."
    },
    "url": {
      "type": "string",
      "description": "Where the bytes live: a `/v1/media/<id>/file` path, an `https` URL, `r2://…`, or (for a web link) the page address."
    },
    "bytes": {
      "type": "integer",
      "description": "Stored size in bytes (0 for links and apps)."
    },
    "checksum": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "type": "boolean",
      "description": "False when archived."
    },
    "folderId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "tags": {
      "description": "Tags — a JSON array of strings for every row written by the API (decoded from storage; left as the raw text if the stored value is not valid JSON)."
    },
    "altText": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "thumbnailUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "width": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "height": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "durationSec": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Video/audio length in seconds."
    },
    "pdfPageCount": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "loopDurationMs": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Animated image loop length."
    },
    "fontFamily": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "fontWeights": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "description": "Font assets: the weights in the file (decoded JSON)."
    },
    "state": {
      "type": "string",
      "description": "Processing state: `ready`, `processing`, `ready_with_warnings`, `blocked`, …"
    },
    "stateReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "stateCode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "stateFault": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "user",
            "platform"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "stateProgress": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "codec": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "playableRev": {
      "type": "integer",
      "description": "Bumped whenever the playable bytes change."
    },
    "loopState": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "queued",
            "ready",
            "failed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "loopCodecs": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "loopRev": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "loopRotation": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "loopBytes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "seqState": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "queued",
            "ready",
            "failed"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Playlist-sequencer rendition state (video only; minted when the video plays in a run of consecutive videos)."
    },
    "seqCodecs": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "seqRev": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "seqRotation": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "seqBytes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "seqConform": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "masterKey": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "masterBytes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "masterProbe": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "rendition4k": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "frameLumaMean": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "frameLumaVariance": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "frameEdgeDensity": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "startsAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Plays only from this time."
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Stops playing after this time."
    },
    "autoArchiveOnExpiry": {
      "type": "boolean"
    },
    "qr": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "description": "QR overlay settings (decoded JSON)."
    },
    "webConfig": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "description": "Web link settings — refresh, zoom, header auth, … (decoded JSON)."
    },
    "replayState": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "healthy",
            "replay_pending",
            "replay_failed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "lastReplayAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "lastReplaySuccessAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "lastFailedStep": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "lastFailedReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "autoCaption": {
      "type": "boolean"
    },
    "captionTrackKey": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "captionState": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "pending",
            "ready",
            "failed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "showCaptions": {
      "type": "boolean"
    },
    "audioEnabled": {
      "type": "boolean"
    },
    "focalRegion": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Smart-fit focal region, as stored JSON text."
    },
    "fit": {
      "type": "string",
      "enum": [
        "contain",
        "cover",
        "fill",
        "blur-fill"
      ],
      "description": "How the asset fills a box."
    },
    "autoSmartFit": {
      "type": "boolean"
    },
    "rotation": {
      "type": "integer",
      "description": "Clockwise rotation in degrees."
    },
    "originalFormat": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "packageEntry": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "packageFiles": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "packageBytes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "importSourceId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "nodeId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Home location; null = workspace library root."
    },
    "recalledAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "recalledBy": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "deletedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "usageCount": {
      "type": "integer",
      "description": "Playlists, schedules, layouts, creatives, boards and screens that use this asset."
    },
    "uploadedByName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Who uploaded it, from the audit log."
    },
    "uploadSource": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "ui",
            "api",
            "mcp"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "How it was uploaded."
    },
    "format": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "File format read from the stored bytes (`PNG`, `MP4 (hevc)`), only when the name has no usable extension; otherwise null."
    }
  },
  "required": [
    "id",
    "spaceId",
    "name",
    "kind",
    "url",
    "bytes",
    "checksum",
    "active",
    "folderId",
    "tags",
    "altText",
    "thumbnailUrl",
    "width",
    "height",
    "durationSec",
    "pdfPageCount",
    "loopDurationMs",
    "fontFamily",
    "fontWeights",
    "state",
    "stateReason",
    "stateCode",
    "stateFault",
    "stateProgress",
    "codec",
    "playableRev",
    "loopState",
    "loopCodecs",
    "loopRev",
    "loopRotation",
    "loopBytes",
    "seqState",
    "seqCodecs",
    "seqRev",
    "seqRotation",
    "seqBytes",
    "seqConform",
    "masterKey",
    "masterBytes",
    "masterProbe",
    "rendition4k",
    "frameLumaMean",
    "frameLumaVariance",
    "frameEdgeDensity",
    "startsAt",
    "expiresAt",
    "autoArchiveOnExpiry",
    "qr",
    "webConfig",
    "replayState",
    "lastReplayAt",
    "lastReplaySuccessAt",
    "lastFailedStep",
    "lastFailedReason",
    "autoCaption",
    "captionTrackKey",
    "captionState",
    "showCaptions",
    "audioEnabled",
    "focalRegion",
    "fit",
    "autoSmartFit",
    "rotation",
    "originalFormat",
    "packageEntry",
    "packageFiles",
    "packageBytes",
    "importSourceId",
    "nodeId",
    "recalledAt",
    "recalledBy",
    "createdAt",
    "updatedAt",
    "deletedAt",
    "usageCount",
    "uploadedByName",
    "uploadSource",
    "format"
  ]
}