Files
triliumnext-korean-patch/updates/2026-09-05/phase9/doc_notes/en/api-ko/etapi.json
T

1776 lines
52 KiB
JSON

{
"openapi": "3.0.3",
"info": {
"version": "1.0.0",
"title": "ETAPI",
"description": "Trilium 외부 API",
"contact": {
"name": "zadam",
"email": "zadam.apps@gmail.com",
"url": "https://github.com/zadam/trilium"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/etapi",
"description": "현재 Trilium 서버"
}
],
"security": [
{
"EtapiTokenAuth": []
},
{
"EtapiBasicAuth": []
}
],
"paths": {
"/create-note": {
"post": {
"description": "노트를 만들고 노트 트리에 배치합니다.",
"operationId": "createNote",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateNoteDef"
}
}
}
},
"responses": {
"201": {
"description": "노트 생성 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NoteWithBranch"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notes": {
"get": {
"description": "노트 검색",
"operationId": "searchNotes",
"parameters": [
{
"name": "search",
"in": "query",
"required": true,
"description": "https://triliumnext.github.io/Docs/Wiki/search.html 에 설명된 형식의 검색어",
"schema": {
"type": "string"
},
"examples": {
"fulltext": {
"summary": "검색어로 전체 텍스트 검색. 정확히 일치할 필요는 없습니다.",
"value": "towers tolkien"
},
"fulltextExactMatch": {
"summary": "정확히 일치하는 전체 텍스트 검색. 큰따옴표를 사용합니다.",
"value": "\"Two Towers\""
},
"fulltextWithLabel": {
"summary": "검색어와 라벨 조건을 모두 만족하는 전체 텍스트 검색",
"value": "towers #book"
}
}
},
{
"name": "fastSearch",
"in": "query",
"required": false,
"description": "빠른 검색 사용. 전체 텍스트 검색에서 본문은 확인하지 않습니다.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"name": "includeArchivedNotes",
"in": "query",
"required": false,
"description": "기본적으로 보관된 노트는 검색하지 않습니다. true로 설정하면 검색 결과에 포함합니다.",
"schema": {
"type": "boolean",
"default": false
}
},
{
"name": "ancestorNoteId",
"in": "query",
"required": false,
"description": "지정한 subtree 노트 ID의 하위 트리만 검색합니다. 기본값은 전체 트리입니다.",
"schema": {
"$ref": "#/components/schemas/EntityId"
}
},
{
"name": "ancestorDepth",
"in": "query",
"required": false,
"description": "검색할 노트의 트리 깊이를 지정합니다.",
"schema": {
"type": "string"
},
"examples": {
"directChildren": {
"summary": "기준 상위 노트에서 정확히 한 단계 아래인 직계 하위 노트. 기준을 지정하지 않으면 루트입니다.",
"value": "eq1"
},
"grandGrandChildren": {
"summary": "기준 상위 노트에서 정확히 세 단계 아래. 기준을 지정하지 않으면 루트입니다.",
"value": "eq3"
},
"lessThan4": {
"summary": "기준 상위 노트에서 네 단계 미만인 깊이 1~3. 기준을 지정하지 않으면 루트입니다.",
"value": "lt4"
},
"greaterThan2": {
"summary": "기준 상위 노트에서 두 단계보다 깊은 위치. 깊이 3부터 해당하며 기준을 지정하지 않으면 루트입니다.",
"value": "gt4"
}
}
},
{
"name": "orderBy",
"in": "query",
"required": false,
"description": "검색 결과 정렬에 사용할 속성 또는 라벨 이름",
"schema": {
"type": "string"
},
"example": [
"title",
"#publicationDate",
"isProtected",
"isArchived",
"dateCreated",
"dateModified",
"utcDateCreated",
"utcDateModified",
"parentCount",
"childrenCount",
"attributeCount",
"labelCount",
"ownedLabelCount",
"relationCount",
"ownedRelationCount",
"relationCountIncludingLinks",
"ownedRelationCountIncludingLinks",
"targetRelationCount",
"targetRelationCountIncludingLinks",
"contentSize",
"contentAndAttachmentsSize",
"contentAndAttachmentsAndRevisionsSize",
"revisionCount"
]
},
{
"name": "orderDirection",
"in": "query",
"required": false,
"description": "정렬 방향. 오름차순 또는 내림차순입니다.",
"schema": {
"type": "string",
"default": "asc",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "반환할 결과 수 제한",
"schema": {
"type": "integer"
},
"example": 10
},
{
"name": "debug",
"in": "query",
"required": false,
"description": "true로 설정하면 검색어 구문 분석에 관한 디버깅 정보를 응답에 포함합니다.",
"schema": {
"type": "boolean",
"default": false
}
}
],
"responses": {
"200": {
"description": "검색 응답",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/SearchResponse"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notes/{noteId}": {
"parameters": [
{
"name": "noteId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"get": {
"description": "ID로 노트를 조회합니다.",
"operationId": "getNoteById",
"responses": {
"200": {
"description": "노트 응답",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"description": "noteId로 지정한 노트에 요청 본문의 변경 사항을 적용합니다.",
"operationId": "patchNoteById",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"responses": {
"200": {
"description": "노트 변경 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"description": "noteId로 지정한 노트 하나를 삭제합니다.",
"operationId": "deleteNoteById",
"responses": {
"204": {
"description": "노트 삭제 완료"
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notes/{noteId}/content": {
"parameters": [
{
"name": "noteId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"get": {
"description": "ID로 노트 본문을 조회합니다.",
"operationId": "getNoteContent",
"responses": {
"200": {
"description": "노트 본문 응답",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
}
}
},
"put": {
"description": "ID로 지정한 노트의 본문을 변경합니다.",
"operationId": "putNoteContentById",
"requestBody": {
"description": "노트의 HTML 본문",
"required": true,
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"responses": {
"204": {
"description": "노트 본문 변경 완료"
}
}
}
},
"/notes/{noteId}/export": {
"parameters": [
{
"name": "noteId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
},
{
"name": "format",
"in": "query",
"required": false,
"schema": {
"enum": [
"html",
"markdown"
],
"default": "html"
}
}
],
"get": {
"description": "지정한 하위 노트 트리를 ZIP 파일로 내보냅니다. 전체 문서를 내보내려면 noteId에 \"root\"를 사용합니다.",
"operationId": "exportNoteSubtree",
"responses": {
"200": {
"description": "내보낸 ZIP 파일",
"content": {
"application/zip": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notes/{noteId}/import": {
"parameters": [
{
"name": "noteId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"post": {
"description": "지정한 노트로 ZIP 파일을 가져옵니다.",
"operationId": "importZip",
"responses": {
"201": {
"description": "노트 생성 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NoteWithBranch"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/notes/{noteId}/revision": {
"parameters": [
{
"name": "noteId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
},
{
"name": "format",
"in": "query",
"required": false,
"schema": {
"enum": [
"html",
"markdown"
],
"default": "html"
}
}
],
"post": {
"description": "지정한 노트의 수정 이력을 만듭니다.",
"operationId": "createRevision",
"responses": {
"204": {
"description": "수정 이력 생성 완료"
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/branches": {
"post": {
"description": "가지를 만들어 같은 노트를 트리의 다른 위치에도 배치합니다. 상위 노트와 하위 노트 사이에 가지가 이미 있으면 기존 가지의 prefix와 notePosition 및 isExpanded를 변경합니다.",
"operationId": "postBranch",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Branch"
}
}
}
},
"responses": {
"200": {
"description": "기존 가지 변경 완료. 상위 노트와 하위 노트 사이에 가지가 이미 있었습니다.",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Branch"
}
}
}
},
"201": {
"description": "가지 생성 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Branch"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/branches/{branchId}": {
"parameters": [
{
"name": "branchId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"get": {
"description": "ID로 가지를 조회합니다.",
"operationId": "getBranchById",
"responses": {
"200": {
"description": "가지 응답",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Branch"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"description": "branchId로 지정한 가지에 요청 본문의 변경 사항을 적용합니다. prefix와 notePosition만 변경할 수 있습니다. 다른 속성을 바꾸려면 기존 가지를 삭제하고 새로 만들어야 합니다.",
"operationId": "patchBranchById",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Branch"
}
}
}
},
"responses": {
"200": {
"description": "가지 변경 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Branch"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"description": "branchId로 지정한 가지를 삭제합니다. 해당 하위 노트의 마지막 가지라면 노트도 삭제합니다.",
"operationId": "deleteBranchById",
"responses": {
"204": {
"description": "가지 삭제 완료"
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/attachments": {
"post": {
"description": "첨부 파일 생성",
"operationId": "postAttachment",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAttachment"
}
}
}
},
"responses": {
"201": {
"description": "첨부 파일 생성 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/attachments/{attachmentId}": {
"parameters": [
{
"name": "attachmentId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"get": {
"description": "ID로 첨부 파일을 조회합니다.",
"operationId": "getAttachmentById",
"responses": {
"200": {
"description": "첨부 파일 응답",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"description": "attachmentId로 지정한 첨부 파일에 요청 본문의 변경 사항을 적용합니다. role과 mime 및 title과 position만 변경할 수 있습니다.",
"operationId": "patchAttachmentById",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
}
},
"responses": {
"200": {
"description": "속성 변경 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"description": "attachmentId로 지정한 첨부 파일을 삭제합니다.",
"operationId": "deleteAttachmentById",
"responses": {
"204": {
"description": "첨부 파일 삭제 완료"
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/attachments/{attachmentId}/content": {
"parameters": [
{
"name": "attachmentId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"get": {
"description": "ID로 첨부 파일 내용을 조회합니다.",
"operationId": "getAttachmentContent",
"responses": {
"200": {
"description": "첨부 파일 내용 응답",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
}
}
},
"put": {
"description": "ID로 지정한 첨부 파일의 내용을 변경합니다.",
"operationId": "putAttachmentContentById",
"requestBody": {
"description": "첨부 파일의 HTML 내용",
"required": true,
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"responses": {
"204": {
"description": "첨부 파일 내용 변경 완료"
}
}
}
},
"/attributes": {
"post": {
"description": "지정한 노트에 속성 생성",
"operationId": "postAttribute",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Attribute"
}
}
}
},
"responses": {
"201": {
"description": "속성 생성 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Attribute"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/attributes/{attributeId}": {
"parameters": [
{
"name": "attributeId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"get": {
"description": "ID로 속성을 조회합니다.",
"operationId": "getAttributeById",
"responses": {
"200": {
"description": "속성 응답",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Attribute"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"patch": {
"description": "attributeId로 지정한 속성에 요청 본문의 변경 사항을 적용합니다. 라벨은 value와 position만 변경할 수 있고 관계는 position만 변경할 수 있습니다. 다른 속성을 바꾸려면 기존 속성을 삭제하고 새로 만들어야 합니다.",
"operationId": "patchAttributeById",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Attribute"
}
}
}
},
"responses": {
"200": {
"description": "속성 변경 완료",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Attribute"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"description": "attributeId로 지정한 속성을 삭제합니다.",
"operationId": "deleteAttributeById",
"responses": {
"204": {
"description": "속성 삭제 완료"
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/refresh-note-ordering/{parentNoteId}": {
"parameters": [
{
"name": "parentNoteId",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/EntityId"
}
}
],
"post": {
"description": "가지의 notePosition은 연결된 클라이언트에 자동으로 전달되지 않습니다. 변경한 순서를 즉시 반영하려면 notePosition을 설정한 뒤 이 기능을 호출하세요. 순서가 바뀐 가지의 parentNoteId를 전달해야 합니다.",
"operationId": "postRefreshNoteOrdering",
"responses": {
"204": {
"description": "연결된 모든 클라이언트에서 노트 순서를 비동기로 갱신합니다."
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/inbox/{date}": {
"get": {
"description": "새 노트를 넣을 수집함 노트를 반환합니다. 날짜 사용 여부는 수집함이 #inbox 라벨로 지정된 고정 노트인지 일지의 날짜별 노트인지에 따라 달라집니다.",
"operationId": "getInboxNote",
"parameters": [
{
"name": "date",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "date"
},
"example": "2022-02-22"
}
],
"responses": {
"200": {
"description": "수집함 노트",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/calendar/days/{date}": {
"get": {
"description": "지정한 날짜의 일별 노트를 반환합니다. 없으면 새로 만듭니다.",
"operationId": "getDayNote",
"parameters": [
{
"name": "date",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "date"
},
"example": "2022-02-22"
}
],
"responses": {
"200": {
"description": "일별 노트",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/calendar/weeks/{date}": {
"get": {
"description": "지정한 날짜의 주별 노트를 반환합니다. 없으면 새로 만듭니다.",
"operationId": "getWeekFirstDayNote",
"parameters": [
{
"name": "date",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "date"
},
"example": "2022-02-22"
}
],
"responses": {
"200": {
"description": "주별 노트",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/calendar/months/{month}": {
"get": {
"description": "지정한 날짜의 주별 노트를 반환합니다. 없으면 새로 만듭니다.",
"operationId": "getMonthNote",
"parameters": [
{
"name": "month",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "[0-9]{4}-[0-9]{2}"
},
"example": "2022-02"
}
],
"responses": {
"200": {
"description": "월별 노트",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/calendar/years/{year}": {
"get": {
"description": "지정한 날짜의 주별 노트를 반환합니다. 없으면 새로 만듭니다.",
"operationId": "getYearNote",
"parameters": [
{
"name": "year",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "[0-9]{4}-[0-9]{2}"
},
"example": "2022-02"
}
],
"responses": {
"200": {
"description": "연도별 노트",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Note"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/auth/login": {
"post": {
"description": "비밀번호로 ETAPI 토큰을 발급받습니다. 이후 ETAPI 호출에 사용합니다.",
"operationId": "login",
"security": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"password": {
"type": "string",
"description": "Trilium 서버 로그인이나 노트 보호에 사용하는 사용자 비밀번호"
}
}
}
}
}
},
"responses": {
"201": {
"description": "인증 토큰",
"content": {
"application/json; charset=utf-8": {
"schema": {
"properties": {
"authToken": {
"type": "string",
"example": "Bc4bFn0Ffiok_4NpbVCDnFz7B2WU+pdhW8B5Ne3DiR5wXrEyqdjgRIsk="
}
}
}
}
}
},
"429": {
"description": "짧은 시간에 요청이 너무 많아 클라이언트 IP가 차단됐습니다. 인증 실패가 원인일 수 있습니다. 잠시 후 다시 시도하세요."
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/auth/logout": {
"post": {
"description": "ETAPI 토큰을 삭제하거나 비활성화하여 로그아웃합니다.",
"operationId": "logout",
"responses": {
"204": {
"description": "로그아웃 성공"
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/app-info": {
"get": {
"description": "실행 중인 Trilium 인스턴스 정보를 반환합니다.",
"operationId": "getAppInfo",
"responses": {
"200": {
"description": "앱 정보",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/AppInfo"
}
}
}
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/backup/{backupName}": {
"parameters": [
{
"name": "backupName",
"in": "path",
"required": true,
"description": "예를 들어 backupName이 \"now\"이면 \"backup-now.db\" 파일에 백업합니다.",
"schema": {
"$ref": "#/components/schemas/StringId"
}
}
],
"put": {
"description": "지정한 이름으로 데이터베이스를 백업합니다.",
"operationId": "createBackup",
"responses": {
"204": {
"description": "백업 생성 완료"
},
"default": {
"description": "예기치 않은 오류",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"EtapiTokenAuth": {
"type": "apiKey",
"in": "header",
"name": "Authorization"
},
"EtapiBasicAuth": {
"type": "http",
"scheme": "basic",
"description": "HTTP 기본 인증에서 사용자 이름은 임의의 문자열을 사용하며 검사하지 않습니다. 예: trilium. 비밀번호 자리에는 발급받은 ETAPI 토큰을 넣습니다. Trilium 로그인 비밀번호는 사용할 수 없습니다. 설정의 ETAPI 항목에서 생성한 토큰을 사용하세요."
}
},
"schemas": {
"CreateNoteDef": {
"type": "object",
"required": [
"parentNoteId",
"title",
"type",
"content"
],
"properties": {
"parentNoteId": {
"$ref": "#/components/schemas/EntityId",
"description": "트리에서 상위 노트의 ID"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"code",
"file",
"image",
"search",
"book",
"relationMap",
"render"
]
},
"mime": {
"type": "string",
"description": "노트 유형이 code 또는 file 또는 image일 때만 지정하면 됩니다.",
"example": "application/json"
},
"content": {
"type": "string"
},
"notePosition": {
"type": "integer",
"description": "상위 노트 안에서의 순서입니다. 일반적인 순서는 10 단위로 증가합니다. 맨 앞에 넣으려면 5를 사용할 수 있고 두 번째는 15를 사용할 수 있습니다. 맨 뒤에 넣으려면 1000000처럼 큰 값을 사용하세요."
},
"prefix": {
"type": "string",
"description": "prefix는 노트가 배치된 가지마다 따로 붙이는 제목 접두사입니다. 같은 노트를 두 곳에 배치하고 한쪽에서만 제목을 조금 다르게 표시하려면 접두사를 사용하세요."
},
"isExpanded": {
"type": "boolean",
"description": "노트를 폴더처럼 펼쳐 표시하려면 true로 설정합니다."
},
"noteId": {
"$ref": "#/components/schemas/EntityId",
"description": "특정 noteId를 강제로 지정하려는 경우에만 입력하세요."
},
"branchId": {
"$ref": "#/components/schemas/EntityId",
"description": "특정 branchId를 강제로 지정하려는 경우에만 입력하세요."
},
"dateCreated": {
"$ref": "#/components/schemas/LocalDateTime",
"description": "노트 생성 시각의 현지 타임스탬프입니다. 현재 시간대의 현재 시각이라는 기본값을 바꿀 때만 지정하세요."
},
"utcDateCreated": {
"$ref": "#/components/schemas/UtcDateTime",
"description": "노트 생성 시각의 UTC 타임스탬프입니다. 현재 시각이라는 기본값을 바꿀 때만 지정하세요."
}
}
},
"Note": {
"type": "object",
"properties": {
"noteId": {
"$ref": "#/components/schemas/EntityId",
"readOnly": true
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"code",
"render",
"file",
"image",
"search",
"relationMap",
"book",
"noteMap",
"mermaid",
"webView",
"shortcut",
"doc",
"contentWidget",
"launcher"
]
},
"mime": {
"type": "string"
},
"isProtected": {
"type": "boolean",
"readOnly": true
},
"blobId": {
"type": "string",
"description": "본문 해시 역할을 하는 데이터 객체의 ID"
},
"attributes": {
"$ref": "#/components/schemas/AttributeList",
"readOnly": true
},
"parentNoteIds": {
"$ref": "#/components/schemas/EntityIdList",
"readOnly": true
},
"childNoteIds": {
"$ref": "#/components/schemas/EntityIdList",
"readOnly": true
},
"parentBranchIds": {
"$ref": "#/components/schemas/EntityIdList",
"readOnly": true
},
"childBranchIds": {
"$ref": "#/components/schemas/EntityIdList",
"readOnly": true
},
"dateCreated": {
"$ref": "#/components/schemas/LocalDateTime"
},
"dateModified": {
"$ref": "#/components/schemas/LocalDateTime",
"readOnly": true
},
"utcDateCreated": {
"$ref": "#/components/schemas/UtcDateTime"
},
"utcDateModified": {
"$ref": "#/components/schemas/UtcDateTime",
"readOnly": true
}
}
},
"Branch": {
"type": "object",
"description": "가지는 노트를 트리에 배치하며 상위 노트와 하위 노트의 관계를 나타냅니다.",
"properties": {
"branchId": {
"$ref": "#/components/schemas/EntityId"
},
"noteId": {
"$ref": "#/components/schemas/EntityId",
"readOnly": true,
"description": "하위 노트 식별자"
},
"parentNoteId": {
"$ref": "#/components/schemas/EntityId",
"readOnly": true,
"description": "상위 노트 식별자"
},
"prefix": {
"type": "string"
},
"notePosition": {
"type": "integer",
"format": "int32"
},
"isExpanded": {
"type": "boolean"
},
"utcDateModified": {
"$ref": "#/components/schemas/UtcDateTime",
"readOnly": true
}
}
},
"NoteWithBranch": {
"type": "object",
"properties": {
"note": {
"$ref": "#/components/schemas/Note"
},
"branch": {
"$ref": "#/components/schemas/Branch"
}
}
},
"Attachment": {
"type": "object",
"description": "첨부 파일은 노트에 속하며 제목과 내용을 가집니다.",
"properties": {
"attachmentId": {
"$ref": "#/components/schemas/EntityId",
"readOnly": true
},
"ownerId": {
"$ref": "#/components/schemas/EntityId",
"description": "첨부 파일 소유자의 식별자. noteId 또는 revisionId입니다."
},
"role": {
"type": "string"
},
"mime": {
"type": "string"
},
"title": {
"type": "string"
},
"position": {
"type": "integer",
"format": "int32"
},
"blobId": {
"type": "string",
"description": "본문 해시 역할을 하는 데이터 객체의 ID"
},
"dateModified": {
"$ref": "#/components/schemas/LocalDateTime",
"readOnly": true
},
"utcDateModified": {
"$ref": "#/components/schemas/UtcDateTime",
"readOnly": true
},
"utcDateScheduledForErasureSince": {
"$ref": "#/components/schemas/UtcDateTime",
"readOnly": true
},
"contentLength": {
"type": "integer",
"format": "int32"
}
}
},
"CreateAttachment": {
"type": "object",
"properties": {
"ownerId": {
"$ref": "#/components/schemas/EntityId",
"description": "첨부 파일 소유자의 식별자. noteId 또는 revisionId입니다."
},
"role": {
"type": "string"
},
"mime": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"position": {
"type": "integer",
"format": "int32"
}
}
},
"Attribute": {
"type": "object",
"description": "속성은 노트에 연결된 키와 값의 쌍이며 라벨과 관계로 나뉩니다.",
"properties": {
"attributeId": {
"$ref": "#/components/schemas/EntityId"
},
"noteId": {
"$ref": "#/components/schemas/EntityId",
"readOnly": true,
"description": "하위 노트 식별자"
},
"type": {
"type": "string",
"enum": [
"label",
"relation"
]
},
"name": {
"type": "string",
"pattern": "^[^\\s]+",
"example": "shareCss"
},
"value": {
"type": "string"
},
"position": {
"type": "integer",
"format": "int32"
},
"isInheritable": {
"type": "boolean"
},
"utcDateModified": {
"$ref": "#/components/schemas/UtcDateTime",
"readOnly": true
}
}
},
"AttributeList": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attribute"
}
},
"SearchResponse": {
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Note"
}
},
"debugInfo": {
"type": "object",
"description": "&debug=true로 활성화한 검색어 구문 분석 디버깅 정보"
}
}
},
"EntityId": {
"type": "string",
"pattern": "[a-zA-Z0-9_]{4,32}",
"example": "evnnmvHTCgIn"
},
"StringId": {
"type": "string",
"pattern": "[a-zA-Z0-9_]{1,32}",
"example": "my_ID"
},
"EntityIdList": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EntityId"
}
},
"LocalDateTime": {
"type": "string",
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}[\\+\\-][0-9]{4}",
"example": "2021-12-31 20:18:11.930+0100"
},
"UtcDateTime": {
"type": "string",
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z",
"example": "2021-12-31 19:18:11.930000+00:00"
},
"AppInfo": {
"type": "object",
"properties": {
"appVersion": {
"type": "string",
"description": "Trilium 버전",
"example": "0.50.2"
},
"dbVersion": {
"type": "integer",
"format": "int32",
"description": "데이터베이스 버전",
"example": 194
},
"syncVersion": {
"type": "integer",
"format": "int32",
"description": "동기화 프로토콜 버전",
"example": 25
},
"buildDate": {
"type": "string",
"format": "date-time",
"description": "빌드 날짜",
"example": "2022-02-09 22:52:36+01:00"
},
"buildRevision": {
"type": "string",
"description": "빌드에 사용한 Git 커밋",
"example": "23daaa2387a0655685377f0a541d154aeec2aae8"
},
"dataDirectory": {
"type": "string",
"description": "Trilium 파일을 저장하는 데이터 디렉토리",
"example": "/home/user/data"
},
"clipperProtocolVersion": {
"type": "string",
"description": "지원하는 Trilium 웹 클리퍼 프로토콜 버전",
"example": 1
},
"utcDateTime": {
"type": "string",
"description": "현재 UTC 날짜와 시각",
"example": "2022-03-07 21:54:25.277000+00:00"
}
}
},
"Error": {
"type": "object",
"required": [
"status",
"code",
"message"
],
"properties": {
"status": {
"type": "integer",
"format": "int32",
"description": "HTTP 응답에 사용한 것과 같은 HTTP 상태 코드",
"example": 400
},
"code": {
"type": "string",
"description": "고정된 문자열 상수",
"example": "NOTE_IS_PROTECTED"
},
"message": {
"type": "string",
"description": "사람이 읽을 수 있는 오류 설명. 추가 정보가 포함될 수 있습니다.",
"example": "노트 'evnnmvHTCgIn'은 보호되어 있어 ETAPI로 변경할 수 없습니다."
}
}
}
}
}
}