Skip to content

Build your personal knowledge base with Trilium Notes

add blobId to the ETAPI #4005

zadamb46d5f4a7192
diff --git a/src/etapi/etapi.openapi.yaml b/src/etapi/etapi.openapi.yaml
index 974acbdfe3..9371331ce3 100644
--- a/src/etapi/etapi.openapi.yaml
+++ b/src/etapi/etapi.openapi.yaml
@@ -782,6 +782,9 @@ components:
isProtected:
type: boolean
readOnly: true
+ blobId:
+ type: string
+ description: ID of the blob object. For "cold" notes, this is effectively a content hash
attributes:
$ref: '#/components/schemas/AttributeList'
readOnly: true
diff --git a/src/etapi/mappers.js b/src/etapi/mappers.js
index ad959f36a6..26f79da01e 100644
--- a/src/etapi/mappers.js
+++ b/src/etapi/mappers.js
@@ -5,6 +5,7 @@ function mapNoteToPojo(note) {
title: note.title,
type: note.type,
mime: note.mime,
+ blobId: note.blobId,
dateCreated: note.dateCreated,
dateModified: note.dateModified,
utcDateCreated: note.utcDateCreated,
@@ -46,4 +47,4 @@ module.exports = {
mapNoteToPojo,
mapBranchToPojo,
mapAttributeToPojo
-};
\ No newline at end of file
+};