(zettel (meta (box-name "manual") (created "20210726174524") (modified "20260729141452") (role "manual") (syntax "zmk") (tags "#api #manual #zettelstore") (title "API: Retrieve metadata of an existing zettel")) (rights read) (content "" "The [[endpoint|00001012920000]] to work with metadata of a specific zettel is ''/z/{ID}'', where ''{ID}'' is a placeholder for the [[zettel identifier|00001006050000]][^If [[authentication is enabled|00001010040100]], you must include a valid [[access token|00001012050200]] in the ''Authorization'' header].\n\nTo retrieve the plain metadata of a zettel, use the query parameter ''part=meta''\n\n````sh\n# 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\n````\n\n=== Data output\n\nAlternatively, you may retrieve the zettel as a parseable object / a [[symbolic expression|00001012930500]] by providing the query parameter ''enc=data'':\n\n```sh\n# curl 'http://127.0.0.1:23123/z/00001012053400?part=meta&enc=data'\n(list (meta (back \"00001012000000 00001012053300\") (backward \"00001012000000 00001012053300\") (box-name \"manual\") (created \"20210726174524\") (forward \"00001006050000 00001010040100 00001012050200 00001012920000 00001012921200 00001012930500\") (modified \"20241216104120\") (published \"20241216104120\") (role \"manual\") (syntax \"zmk\") (tags \"#api #manual #zettelstore\") (title \"API: Retrieve metadata of an existing zettel\")) (rights create read update delete))\n```\n\nPretty-printed, this results in:\n```\n(list\n (meta\n (back \"00001012000000 00001012053300\")\n (backward \"00001012000000 00001012053300\")\n (box-name \"manual\")\n (created \"20210726174524\")\n (forward \"00001006050000 00001010040100 00001012050200 00001012920000 00001012921200 00001012930500\")\n (modified \"20241216104120\")\n (published \"20241216104120\")\n (role \"manual\")\n (syntax \"zmk\")\n (tags \"#api #manual #zettelstore\")\n (title \"API: Retrieve metadata of an existing zettel\"))\n (rights create read update delete))\n```\n\n* The result is a list, starting with the symbol ''list''.\n* Then, some key/value pairs are following, also nested.\n* Nested in ''meta'' are the metadata, each as a key/value pair.\n* ''rights'' specifies the [[access rights|00001012921200]] the user has for this zettel.\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.\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."))