Skip to content

LibraryScanResponseDto

Endpoints · All schemas

FieldRequiredDescription
addedYesNew items indexed
checkedYesIndexed items checked against their folder
createdAtYesWhen the scan was asked for
errorYesFailure detail for the administrator
errorCodeYesStable failure code
finishedAtYesWhen the scan ended
offlinedYesItems whose file is missing, marked offline
onlinedYesOffline items whose file is back
operationIdYesThe scan job, a media operation of kind library_scan
pauseRequestedYesA pause was asked for and the scan has not reached it yet
phaseYesSee definition below
processedUnitsYesFiles and items handled so far
progressYesProgress, 0 to 100
retryingYesThe scan failed once and waits for its automatic retry
startedAtYesWhen the scan first started
statusYesSee definition below
stopReasonYesSee definition below
totalUnitsYesFiles and items known so far; grows while the folders are read
updatedYesItems whose file changed and are read again

Complete definition

required lists fields that must be present. nullable allows a null value; it does not make the field optional. Response enums retain exact wire values for compatibility.

Field definitions: LibraryScanPhase, MediaOperationStatus, LibraryScanStopReason

{
  "properties": {
    "added": {
      "description": "New items indexed",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "checked": {
      "description": "Indexed items checked against their folder",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "createdAt": {
      "description": "When the scan was asked for",
      "example": "2024-01-01T00:00:00.000Z",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "type": "string"
    },
    "error": {
      "description": "Failure detail for the administrator",
      "nullable": true,
      "type": "string"
    },
    "errorCode": {
      "description": "Stable failure code",
      "nullable": true,
      "type": "string"
    },
    "finishedAt": {
      "description": "When the scan ended",
      "example": "2024-01-01T00:00:00.000Z",
      "format": "date-time",
      "nullable": true,
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "type": "string"
    },
    "offlined": {
      "description": "Items whose file is missing, marked offline",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "onlined": {
      "description": "Offline items whose file is back",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "operationId": {
      "description": "The scan job, a media operation of kind library_scan",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    },
    "pauseRequested": {
      "description": "A pause was asked for and the scan has not reached it yet",
      "type": "boolean"
    },
    "phase": {
      "$ref": "#/components/schemas/LibraryScanPhase"
    },
    "processedUnits": {
      "description": "Files and items handled so far",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "progress": {
      "description": "Progress, 0 to 100",
      "format": "double",
      "maximum": 100,
      "minimum": 0,
      "type": "number"
    },
    "retrying": {
      "description": "The scan failed once and waits for its automatic retry",
      "type": "boolean"
    },
    "startedAt": {
      "description": "When the scan first started",
      "example": "2024-01-01T00:00:00.000Z",
      "format": "date-time",
      "nullable": true,
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "type": "string"
    },
    "status": {
      "$ref": "#/components/schemas/MediaOperationStatus"
    },
    "stopReason": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LibraryScanStopReason"
        }
      ],
      "nullable": true
    },
    "totalUnits": {
      "description": "Files and items known so far; grows while the folders are read",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "updated": {
      "description": "Items whose file changed and are read again",
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "added",
    "checked",
    "createdAt",
    "error",
    "errorCode",
    "finishedAt",
    "offlined",
    "onlined",
    "operationId",
    "pauseRequested",
    "phase",
    "processedUnits",
    "progress",
    "retrying",
    "startedAt",
    "status",
    "stopReason",
    "totalUnits",
    "updated"
  ],
  "type": "object"
}