Metadata API - davidmarsoni/llog GitHub Wiki


 Go back to the API Main page 

📜 File Management - Metadata APIs

APIs for viewing and managing metadata associated with cached items.

  • /files/metadata/<path:file_id> - Displays the metadata view page for a specific file
  • /files/metadata/<path:file_id>/update - Updates the metadata for a specific file
  • /files/metadata/<path:file_id>/generate - Triggers AI-powered generation of metadata for a file

/files/metadata/path:file_id

Displays the metadata view page for a specific file.

QUERY: GET /files/metadata/<path:file_id>

ARGS (URL Path):
- file_id: The ID of the item whose metadata is to be viewed.

RETURN: Renders the 'metadata_view.html' page with the item's metadata.

/files/metadata/path:file_id/update

Updates the metadata for a specific file. Accepts JSON payload.

QUERY: POST /files/metadata/<path:file_id>/update

ARGS (URL Path):
- file_id: The ID of the item whose metadata is to be updated.

ARGS (JSON Body):
- title: (Optional) New title for the item.
- folder: (Optional) New folder path for the item.
- auto_metadata: (Optional) Object containing fields like 'summary', 'language', 'contentType', 'themes', 'topics', 'keywords', 'entities'.

RETURN: JSON response:
- success: Boolean indicating success or failure.
- error: (Optional) Error message if success is false.

/files/metadata/path:file_id/generate

Triggers AI-powered generation of metadata (summary, keywords, etc.) for a file.

QUERY: POST /files/metadata/<path:file_id>/generate

ARGS (URL Path):
- file_id: The ID of the item for which to generate metadata.

RETURN: JSON response:
- success: Boolean indicating success or failure.
- metadata: (Optional) The updated metadata object if successful.
- error: (Optional) Error message if success is false.


 Go back to the API Main page 

⚠️ **GitHub.com Fallback** ⚠️