Skip to content

Joplin API

API Documentation, Joplin Official Documentation

Introduction

The js wrapper for Joplin api, written in ts, provides a complete type definition, incorporating all currently publicly documented apis.

Quickstart

ts
import { config, noteApi } from 'joplin-api'

config.baseUrl = 'http://127.0.0.1:27583'
config.token = '***'
const res = await noteApi.list()
console.log(res)

For more examples, refer to https://github.com/rxliuli/joplin-utils/tree/master/packages/joplin-api/src/api/__tests__

API Reference

ObjectDescription
eventApiEvent-related apis, such as obtaining note modification history
folderApiDirectory related apis, such as fetching directory tree
folderExtApiDirectory extension api, such as moving directories
joplinApiBasic joplin api, for example, check if joplin web service is running
noteActionApiNote-related action apis, such as opening notes in an external editor
noteApiNote-related api, such as obtaining the content of notes
noteExtApiNote extension api, such as renaming
resourceActionApiResource action apis, such as opening attached resources in an external editor
resourceApiResource related api, for example uploading pictures
searchApiSearch-related api
tagApiTag related api, such as modifying the tag of notes
configGlobal joplin web clipper configuration
PageUtilPagination related static utility class, such as obtaining a full list of notes

Naming Conventions

  • Use class to encapsulate API, for example, the API related to note is encapsulated in the NoteApi class.
  • The same functionality keeps a unified name, such as the note list is NoteApi.list. Here is the complete comparison table
ImplicationNamingExample
ListlistnoteApi.list
Get by idgetnoteApi.get
CreatecreatenoteApi.create
UpdateupdatenoteApi.update
DeleteremovenoteApi.remove
  • There are some special cases, for example, api involving multiple entities, the naming is usually operation entity + by + according to entity, for example, the api of getting the tag list by note id is noteApi.tagsById

Some Issues

  • The get method should not error out, if it does not exist it should return null instead of throwing an exception

Released under the MIT License.