(zettel (meta (back "00001006000000 00001012000000 00001012053600") (backward "00001006000000 00001012000000 00001012053600") (box-number "1") (created "20210726174524") (forward "00001006050000 00001010040100 00001012050200 00001012920000 00001012920500 00001012920510 00001012920516 00001012920519 00001012920800") (modified "20230807170112") (published "20230807170112") (role "manual") (syntax "zmk") (tags "#api #manual #zettelstore") (title "API: Retrieve evaluated metadata and content of an existing zettel in various encodings")) (rights 4) (encoding "") (content "The [[endpoint|00001012920000]] to work with evaluated metadata and content of a specific zettel is ''/z/{ID}'', where ''{ID}'' is a placeholder for the [[zettel identifier|00001006050000]].\n\nFor example, to retrieve some evaluated data about this zettel you are currently viewing in [[Sz encoding|00001012920516]], just send a HTTP GET request to the endpoint ''/z/00001012053500''[^If [[authentication is enabled|00001010040100]], you must include the a valid [[access token|00001012050200]] in the ''Authorization'' header] with the query parameter ''enc=sz''.\nIf successful, the output is a symbolic expression value:\n```sh\n# curl 'http://127.0.0.1:23123/z/00001012053500?enc=sz'\n((PARA (TEXT \"The\") (SPACE) (LINK-ZETTEL () \"00001012920000\" (TEXT \"endpoint\")) (SPACE) (TEXT \"to\") (SPACE) (TEXT \"work\") (SPACE) (TEXT \"with\") (SPACE) (TEXT \"evaluated\") (SPACE) (TEXT \"metadata\") (SPACE) (TEXT \"and\") (SPACE) (TEXT \"content\") (SPACE) (TEXT \"of\") (SPACE) (TEXT \"a\") (SPACE) (TEXT \"specific\") (SPACE) (TEXT \"zettel\") (SPACE) (TEXT \"is\") (SPACE) (LITERAL-INPUT () \"/z/{ID}\") (TEXT \",\") (SPACE) (TEXT \"where\") (SPACE) (LITERAL-INPUT () \"{ID}\") ...\n```\n\nTo select another encoding, you must provide the query parameter ''enc=ENCODING''.\nOthers are \"\"[[html|00001012920510]]\"\", \"\"[[text|00001012920519]]\"\", and some [[more|00001012920500]].\nIn addition, you may provide a query parameter ''part=PART'' to select the relevant [[part|00001012920800]] of a zettel.\n```sh\n# 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...\n```\n\n=== HTTP Status codes\n; ''200''\n: Retrieval was successful, the body contains an appropriate data value.\n; ''400''\n: Request was not valid. \n There are several reasons for this.\n Maybe the zettel identifier did not consist of exactly 14 digits or ''enc'' / ''part'' contained illegal values.\n; ''403''\n: You are not allowed to retrieve data of the given zettel.\n; ''404''\n: Zettel not found.\n You probably used a zettel identifier that is not used in the Zettelstore."))