(((meta (@ (content . "API: Retrieve evaluated metadata and content of an existing zettel in various encodings") (name . "title"))) (meta (@ (content . "manual") (name . "role"))) (meta (@ (content . "#api #manual #zettelstore") (name . "tags"))) (meta (@ (content . "zmk") (name . "syntax"))) (meta (@ (content . "00001006000000 00001012000000 00001012053600") (name . "back"))) (meta (@ (content . "00001006000000 00001012000000 00001012053600") (name . "backward"))) (meta (@ (content . "1") (name . "box-number"))) (meta (@ (content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta (@ (content . "20210726174524") (name . "created"))) (meta (@ (content . "00001006050000 00001010040100 00001012050200 00001012920000 00001012920500 00001012920510 00001012920516 00001012920519 00001012920800") (name . "forward"))) (meta (@ (content . "en") (name . "lang"))) (meta (@ (content . "EUPL-1.2-or-later") (name . "license"))) (meta (@ (content . "20240620171057") (name . "modified"))) (meta (@ (content . "20240620171057") (name . "published"))) (meta (@ (content . "public") (name . "visibility")))) (p "The " (a (@ (href . "00001012920000")) "endpoint") " to work with evaluated metadata and content of a specific zettel is " (kbd "/z/{ID}") ", where " (kbd "{ID}") " is a placeholder for the " (a (@ (href . "00001006050000")) "zettel identifier") ".") (p "For example, to retrieve some evaluated data about this zettel you are currently viewing in " (a (@ (href . "00001012920516")) "Sz encoding") ", just send a HTTP GET request to the endpoint " (kbd "/z/00001012053500") (sup (@ (id . "fnref:1")) (a (@ (class . "zs-noteref") (href . "#fn:1") (role . "doc-noteref")) "1")) " with the query parameter " (kbd "enc=sz") "." " " "If successful, the output is a symbolic expression value:") (pre (code (@ (class . "language-sh")) "# curl 'http://127.0.0.1:23123/z/00001012053500?enc=sz'\n(BLOCK (PARA (TEXT \"The \") (LINK-ZETTEL () \"00001012920000\" (TEXT \"endpoint\")) (TEXT \" to work with parsed metadata and content of a specific zettel is \") (LITERAL-INPUT () \"/z/{ID}\") (TEXT \", where \") (LITERAL-INPUT () \"{ID}\") (TEXT \" is a placeholder for the \") ...")) (p "To select another encoding, you must provide the query parameter " (kbd "enc=ENCODING") "." " " "Others are " (@L (@H "“") (a (@ (href . "00001012920510")) "html") (@H "”")) ", " (@L (@H "“") (a (@ (href . "00001012920519")) "text") (@H "”")) ", and some " (a (@ (href . "00001012920500")) "more") "." " " "In addition, you may provide a query parameter " (kbd "part=PART") " to select the relevant " (a (@ (href . "00001012920800")) "part") " of a zettel.") (pre (code (@ (class . "language-sh")) "# curl 'http://127.0.0.1:23123/z/00001012053500?enc=html&part=zettel'\n\n\n\nAPI: Retrieve evaluated metadata and content of an existing zettel in various encodings\n\n\n\n\n\n\n\n\">\n\n\n\n\n\n\n\n\n\n

API: Retrieve evaluated metadata and content of an existing zettel in various encodings

\n

The endpoint to work with evaluated metadata and content of a specific zettel is /z/{ID},\n...")) (h2 (@ (id . "http-status-codes")) "HTTP Status codes") (dl (dt (kbd "200")) (dd (p "Retrieval was successful, the body contains an appropriate data value.")) (dt (kbd "400")) (dd (p "Request was not valid." (br) "There are several reasons for this." " " "Maybe the zettel identifier did not consist of exactly 14 digits or " (kbd "enc") " / " (kbd "part") " contained illegal values.")) (dt (kbd "403")) (dd (p "You are not allowed to retrieve data of the given zettel.")) (dt (kbd "404")) (dd (p "Zettel not found." " " "You probably used a zettel identifier that is not used in the Zettelstore."))))