Skip to content

Media Health API

Base URL: https://YOUR-SERVER/api. Send your API key in x-api-key where authentication is required. A key also needs the listed permission; your account's access rules still apply.

API guide · All endpoints · OpenAPI JSON

List media health findings

GET /api/media-health

List missing and corrupt media health findings in timeline buckets.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
allAccountsqueryNoReview every account; administrators only
categoryqueryNo
needsAttentionqueryNoOnly findings that still need a decision
ownerIdqueryNoAccount to review; administrators only for another account
pagequeryNointeger
sizequeryNointeger
statusqueryNo
Parameter types, defaults and constraints

Field definitions: MediaHealthCategory, MediaHealthStatus

[
  {
    "name": "allAccounts",
    "required": false,
    "in": "query",
    "description": "Review every account; administrators only",
    "schema": {
      "type": "boolean"
    }
  },
  {
    "name": "category",
    "required": false,
    "in": "query",
    "schema": {
      "$ref": "#/components/schemas/MediaHealthCategory"
    }
  },
  {
    "name": "needsAttention",
    "required": false,
    "in": "query",
    "description": "Only findings that still need a decision",
    "schema": {
      "type": "boolean"
    }
  },
  {
    "name": "ownerId",
    "required": false,
    "in": "query",
    "description": "Account to review; administrators only for another account",
    "schema": {
      "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"
    }
  },
  {
    "name": "page",
    "required": false,
    "in": "query",
    "schema": {
      "minimum": 1,
      "maximum": 9007199254740991,
      "default": 1,
      "type": "integer"
    }
  },
  {
    "name": "size",
    "required": false,
    "in": "query",
    "schema": {
      "minimum": 1,
      "maximum": 200,
      "default": 100,
      "type": "integer"
    }
  },
  {
    "name": "status",
    "required": false,
    "in": "query",
    "schema": {
      "$ref": "#/components/schemas/MediaHealthStatus"
    }
  }
]

Responses

Field definitions: MediaHealthListResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthListResponseDto"
        }
      }
    },
    "description": ""
  }
}

Choose media health candidates

POST /api/media-health/candidates/choose

Record which verified exact copy each missing original should be relinked to.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthChooseCandidatesDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthChooseCandidatesDto"
    }
  }
}

Responses

Field definitions: MediaHealthBulkResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthBulkResponseDto"
        }
      }
    },
    "description": ""
  }
}

Move confirmed corrupt media to trash

DELETE /api/media-health/corrupt

Move recently confirmed corrupt media findings to trash after revalidation.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthDeleteCorruptDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthDeleteCorruptDto"
    }
  }
}

Responses

Field definitions: MediaHealthBulkResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthBulkResponseDto"
        }
      }
    },
    "description": ""
  }
}

Recover damaged media from a verified copy

POST /api/media-health/corrupt/recover

Queue a durable job replacing confirmed damage with an exact, decoded copy while keeping the damaged file.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthRecoverDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthRecoverDto"
    }
  }
}

Responses

Field definitions: MediaHealthBulkResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthBulkResponseDto"
        }
      }
    },
    "description": ""
  }
}

Start corrupt media scan

POST /api/media-health/corrupt/scan

Queue an explicit scan that validates source media integrity.

Authentication: API key. Permission: all.

Responses

Field definitions: MediaHealthScanResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthScanResponseDto"
        }
      }
    },
    "description": ""
  }
}

Scan chosen photos for damaged media

POST /api/media-health/corrupt/scan/assets

Queue a scan validating the source media of chosen photos only.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthScanDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthScanDto"
    }
  }
}

Responses

Field definitions: MediaHealthScanResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthScanResponseDto"
        }
      }
    },
    "description": ""
  }
}

Dismiss media health findings

POST /api/media-health/dismiss

Dismiss selected media health findings without modifying assets.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthBulkActionDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthBulkActionDto"
    }
  }
}

Responses

{
  "204": {
    "description": ""
  }
}

List damaged and missing files

GET /api/media-health/files

One page of a tab of damaged and missing files: what needs the caller, what Frameleaf fixed in the last 30 days, or what was left as it is. Members see their own; administrators see every account, without another account’s pictures.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
skipqueryNoHow many to skip
tabqueryYes
takequeryNoHow many to list (1 to 200)
Parameter types, defaults and constraints

Field definitions: FileProblemTab

[
  {
    "name": "skip",
    "required": false,
    "in": "query",
    "description": "How many to skip",
    "schema": {
      "minimum": 0,
      "maximum": 9007199254740991,
      "default": 0,
      "type": "integer"
    }
  },
  {
    "name": "tab",
    "required": true,
    "in": "query",
    "schema": {
      "$ref": "#/components/schemas/FileProblemTab"
    }
  },
  {
    "name": "take",
    "required": false,
    "in": "query",
    "description": "How many to list (1 to 200)",
    "schema": {
      "minimum": 1,
      "maximum": 200,
      "default": 50,
      "type": "integer"
    }
  }
]

Responses

Field definitions: FileProblemPageDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileProblemPageDto"
        }
      }
    },
    "description": ""
  }
}

List the folders to look in for a file

GET /api/media-health/files/folders

The folders the caller may search for an exact copy of a missing or changed file: library storage and their own external libraries, and for administrators also recovery folders and drives added in Frameleaf Manager.

Authentication: API key. Permission: all.

Responses

Field definitions: FileProblemFolderDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "items": {
            "$ref": "#/components/schemas/FileProblemFolderDto"
          },
          "type": "array"
        }
      }
    },
    "description": ""
  }
}

Get a damaged or missing file

GET /api/media-health/files/{id}

One damaged or missing file and what happened to it, oldest first, open or closed.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "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"
    }
  }
]

Responses

Field definitions: FileProblemDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileProblemDto"
        }
      }
    },
    "description": ""
  }
}

Keep a damaged or missing file as it is

POST /api/media-health/files/{id}/keep

Move a file that needs the owner to the files left as they are. Only the owner can keep it.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "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"
    }
  }
]

Responses

Field definitions: FileProblemDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileProblemDto"
        }
      }
    },
    "description": ""
  }
}

Download the damaged file a repair kept

GET /api/media-health/files/{id}/kept-file

The damaged file Frameleaf kept when it repaired the photo, as it was. Only the owner can download it, only while the latest fix is a repair whose kept file is still there, and not while the photo is Locked.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "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"
    }
  }
]

Responses

{
  "200": {
    "content": {
      "application/octet-stream": {
        "schema": {
          "format": "binary",
          "type": "string"
        }
      },
      "image/jpeg": {
        "schema": {
          "format": "binary",
          "type": "string"
        }
      }
    },
    "description": ""
  }
}

Look in a folder for a missing or changed file

POST /api/media-health/files/{id}/look-in

Search one folder the owner may search for an exact copy, and put it back when there is exactly one. Answers at once; what was found is added to the history when the search is done.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "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"
    }
  }
]

Request body

Required.

Field definitions: FileProblemLookInDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/FileProblemLookInDto"
    }
  }
}

Responses

Field definitions: FileProblemDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileProblemDto"
        }
      }
    },
    "description": ""
  }
}

Try to fix a damaged or missing file again

POST /api/media-health/files/{id}/try-again

Check the file again and fix what can be fixed, from the start. A repair someone undid is not redone by itself.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "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"
    }
  }
]

Responses

Field definitions: FileProblemDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileProblemDto"
        }
      }
    },
    "description": ""
  }
}

Undo what Frameleaf fixed

POST /api/media-health/files/{id}/undo

Put back the file the photo used before Frameleaf repaired, relinked or restored it, keeping every file. Only the owner can undo, not once the photo changed since the fix, and not while it is Locked.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "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"
    }
  }
]

Responses

Field definitions: FileProblemDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileProblemDto"
        }
      }
    },
    "description": ""
  }
}

Locate missing media

POST /api/media-health/missing/locate

Queue a durable exact-checksum search of the chosen locations for missing originals or copies of confirmed damage.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthLocateDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthLocateDto"
    }
  }
}

Responses

Field definitions: MediaHealthScanResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthScanResponseDto"
        }
      }
    },
    "description": ""
  }
}

Relink missing media

POST /api/media-health/missing/relink

Queue a durable job relinking missing originals to their verified exact copies.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthBulkActionDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthBulkActionDto"
    }
  }
}

Responses

Field definitions: MediaHealthBulkResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthBulkResponseDto"
        }
      }
    },
    "description": ""
  }
}

Start missing media scan

POST /api/media-health/missing/scan

Queue an owner-scoped scan that identifies missing files and restores supported untracked media.

Authentication: API key. Permission: all.

Responses

Field definitions: MediaHealthScanResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthScanResponseDto"
        }
      }
    },
    "description": ""
  }
}

Scan chosen photos for missing media

POST /api/media-health/missing/scan/assets

Queue a scan of chosen photos only, which brings back no untracked media.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthScanDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthScanDto"
    }
  }
}

Responses

Field definitions: MediaHealthScanResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthScanResponseDto"
        }
      }
    },
    "description": ""
  }
}

Reopen media health findings

POST /api/media-health/reopen

Undo a dismissal, or reopen confirmed damage whose item was restored from the trash, putting the findings back in review.

Authentication: API key. Permission: all.

Request body

Required.

Field definitions: MediaHealthBulkActionDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/MediaHealthBulkActionDto"
    }
  }
}

Responses

Field definitions: MediaHealthBulkResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthBulkResponseDto"
        }
      }
    },
    "description": ""
  }
}

List Library Care search locations

GET /api/media-health/roots

Locations the caller may search for exact copies of missing or damaged originals.

Authentication: API key. Permission: all.

Responses

Field definitions: MediaHealthRootsResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthRootsResponseDto"
        }
      }
    },
    "description": ""
  }
}

Get Library Care summary

GET /api/media-health/summary

Queue sizes for missing, damaged, duplicate, import and enrichment work, the latest scan or search, and recent Library Care jobs.

Authentication: API key. Permission: all.

Parameters

NameWhereRequiredDescription
allAccountsqueryNoReview every account; administrators only
ownerIdqueryNoAccount to review; administrators only for another account
Parameter types, defaults and constraints
[
  {
    "name": "allAccounts",
    "required": false,
    "in": "query",
    "description": "Review every account; administrators only",
    "schema": {
      "type": "boolean"
    }
  },
  {
    "name": "ownerId",
    "required": false,
    "in": "query",
    "description": "Account to review; administrators only for another account",
    "schema": {
      "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"
    }
  }
]

Responses

Field definitions: MediaHealthSummaryResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MediaHealthSummaryResponseDto"
        }
      }
    },
    "description": ""
  }
}