title: API role: manual tags: #api #manual #zettelstore syntax: zmk back: 00001000000000 00001004010000 00001004020000 00001004051000 00001005000000 00001007720900 00001010000000 00001012920500 00001019990010 backward: 00001000000000 00001004010000 00001004020000 00001004051000 00001005000000 00001007720900 00001010000000 00001012053200 00001012920500 00001014000000 00001019990010 box-number: 1 copyright: (c) 2020-present by Detlef Stern created: 20210126175322 forward: 00001010040100 00001010040700 00001012050200 00001012050400 00001012050600 00001012051200 00001012051400 00001012051600 00001012051800 00001012053200 00001012053300 00001012053400 00001012053500 00001012053600 00001012054200 00001012054400 00001012054600 00001012070500 00001012080100 00001012080200 00001012080500 00001012920000 00001012930000 00001014000000 lang: en license: EUPL-1.2-or-later modified: 20231128183617 published: 20231128183617 visibility: public The API (short for ""**A**pplication **P**rogramming **I**nterface"") is the primary way to communicate with a running Zettelstore. Most integration with other systems and services is done through the API. The [[web user interface|00001014000000]] is just an alternative, secondary way of interacting with a Zettelstore. === Background The API is HTTP-based and uses plain text and [[symbolic expressions|00001012930000]] as its main encoding formats for exchanging messages between a Zettelstore and its client software. There is an [[overview zettel|00001012920000]] that shows the structure of the endpoints used by the API and gives an indication about its use. === Authentication If [[authentication is enabled|00001010040100]], most API calls must include an [[access token|00001010040700]] that proves the identity of the caller. * [[Authenticate an user|00001012050200]] to obtain an access token * [[Renew an access token|00001012050400]] without costly re-authentication * [[Provide an access token|00001012050600]] when doing an API call === Zettel lists * [[List all zettel|00001012051200]] * [[Query the list of all zettel|00001012051400]] * [[Determine a tag zettel|00001012051600]] * [[Determine a role zettel|00001012051800]] === Working with zettel * [[Create a new zettel|00001012053200]] * [[Retrieve metadata and content of an existing zettel|00001012053300]] * [[Retrieve metadata of an existing zettel|00001012053400]] * [[Retrieve evaluated metadata and content of an existing zettel in various encodings|00001012053500]] * [[Retrieve parsed metadata and content of an existing zettel in various encodings|00001012053600]] * [[Update metadata and content of a zettel|00001012054200]] * [[Rename a zettel|00001012054400]] * [[Delete a zettel|00001012054600]] === Various helper methods * [[Retrieve administrative data|00001012070500]] * [[Execute some commands|00001012080100]] ** [[Check for authentication|00001012080200]] ** [[Refresh internal data|00001012080500]]