((META (EMPTY-STRING title "API: Retrieve metadata of an existing zettel") (WORD role "manual") (TAG-SET tags ("#api" "#manual" "#zettelstore")) (WORD syntax "zmk") (ZID-SET back ("00001012000000" "00001012053300")) (ZID-SET backward ("00001012000000" "00001012053300")) (NUMBER box-number "1") (STRING copyright "(c) 2020-present by Detlef Stern ") (TIMESTAMP created "20210726174524") (ZID-SET forward ("00001006050000" "00001010040100" "00001012050200" "00001012920000" "00001012921200" "00001012930500")) (WORD lang "en") (EMPTY-STRING license "EUPL-1.2-or-later") (TIMESTAMP modified "20230807170155") (TIMESTAMP published "20230807170155") (WORD visibility "public")) (BLOCK (PARA (TEXT "The ") (LINK-ZETTEL () "00001012920000" (TEXT "endpoint")) (TEXT " to work with metadata of a specific zettel is ") (LITERAL-INPUT () "/z/{ID}") (TEXT ", where ") (LITERAL-INPUT () "{ID}") (TEXT " is a placeholder for the ") (LINK-ZETTEL () "00001006050000" (TEXT "zettel identifier")) (ENDNOTE () (TEXT "If ") (LINK-ZETTEL () "00001010040100" (TEXT "authentication is enabled")) (TEXT ", you must include the a valid ") (LINK-ZETTEL () "00001012050200" (TEXT "access token")) (TEXT " in the ") (LITERAL-INPUT () "Authorization") (TEXT " header")) (TEXT ".")) (PARA (TEXT "To retrieve the plain metadata of a zettel, use the query parameter ") (LITERAL-INPUT () "part=meta")) (VERBATIM-CODE (("" . "sh")) "# curl 'http://127.0.0.1:23123/z/00001012053400?part=meta'\ntitle: API: Retrieve metadata of an existing zettel\nrole: manual\ntags: #api #manual #zettelstore\nsyntax: zmk") (HEADING 1 () "data-output" "data-output" (TEXT "Data output")) (PARA (TEXT "Alternatively, you may retrieve the zettel as a parseable object / a ") (LINK-ZETTEL () "00001012930500" (TEXT "symbolic expression")) (TEXT " by providing the query parameter ") (LITERAL-INPUT () "enc=data") (TEXT ":")) (VERBATIM-CODE (("" . "sh")) "# curl 'http://127.0.0.1:23123/z/00001012053400?part=meta&enc=data'\n(list (meta (title \"API: Retrieve metadata of an existing zettel\") (role \"manual\") (tags \"#api #manual #zettelstore\") (syntax \"zmk\") (back \"00001012000000 00001012053300\") (backward \"00001012000000 00001012053300\") (box-number \"1\") (created \"20210726174524\") (forward \"00001006020000 00001006050000 00001010040100 00001012050200 00001012920000 00001012921200\") (modified \"20230703174515\") (published \"20230703174515\")) (rights 62))") (PARA (TEXT "Pretty-printed, this results in:")) (VERBATIM-CODE () "(list (meta (title \"API: Retrieve metadata of an existing zettel\")\n (role \"manual\")\n (tags \"#api #manual #zettelstore\")\n (syntax \"zmk\")\n (back \"00001012000000 00001012053300\")\n (backward \"00001012000000 00001012053300\")\n (box-number \"1\")\n (created \"20210726174524\")\n (forward \"00001006020000 00001006050000 00001010040100 00001012050200 00001012920000 00001012921200\")\n (modified \"20230703174515\")\n (published \"20230703174515\"))\n (rights 62))") (UNORDERED (INLINE (TEXT "The result is a list, starting with the symbol ") (LITERAL-INPUT () "list") (TEXT ".")) (INLINE (TEXT "Then, some key/value pairs are following, also nested.")) (INLINE (TEXT "Nested in ") (LITERAL-INPUT () "meta") (TEXT " are the metadata, each as a key/value pair.")) (INLINE (LITERAL-INPUT () "rights") (TEXT " specifies the ") (LINK-ZETTEL () "00001012921200" (TEXT "access rights")) (TEXT " the user has for this zettel."))) (HEADING 1 () "http-status-codes" "http-status-codes" (TEXT "HTTP Status codes")) (DESCRIPTION ((LITERAL-INPUT () "200")) (BLOCK (BLOCK (PARA (TEXT "Retrieval was successful, the body contains an appropriate data value.")))) ((LITERAL-INPUT () "400")) (BLOCK (BLOCK (PARA (TEXT "Request was not valid.") (HARD) (TEXT "There are several reasons for this.") (SOFT) (TEXT "Maybe the zettel identifier did not consist of exactly 14 digits.")))) ((LITERAL-INPUT () "403")) (BLOCK (BLOCK (PARA (TEXT "You are not allowed to retrieve data of the given zettel.")))) ((LITERAL-INPUT () "404")) (BLOCK (BLOCK (PARA (TEXT "Zettel not found.") (SOFT) (TEXT "You probably used a zettel identifier that is not used in the Zettelstore.")))))))