(zettel (meta (box-name "manual") (created "20220304164242") (modified "20261109130758") (role "manual") (syntax "zmk") (tags "#api #manual #zettelstore") (title "API: Site information")) (rights read) (content "" "Zettelstore can be configured to suit your personal needs.\nFor example, you can configure the [[''site-name''|00001004020000#site-name]] or the [[default language|00001004020000#lang]].\nA user may override the language configuration or the [[''home-zettel''|00001004020000#home-zettel]] by specifying the appropriate key-value pairs in the [[user zettel|00001010040200]] (see also: [[Runtime configuration data that may be user specific or zettel specific|00001004020200]]).\n\nThe zettel containing the [[runtime configuration|00001004020000]] is not available to all users in all situations.\nFor example, if [[authentication is enabled|00001010040100]] and the current user is not authorized as an [[owner|00001010070200]], the runtime configuration cannot be read by the authenticated user.\n\nTo retrieve some important data, send an HTTP GET request to the endpoint ''/x'' with the query parameter ''data=site-info''.\n\nAuthentication for this request is optional.\nIf authentication is enabled and the current user is authenticated, the request will be handled using that user's credentials.\n\n```sh\n# curl 'http://127.0.0.1:23123/x?data=site-info'\n(\"Zettelstore Manual\" \"en\" \"00001000000000\" \"en\")\n```\n\n* The first string contains the site name.\n* The second string holds the default language.\n* The identifier of the home zettel is stored in the third string.\n* The fourth string contains the currently active language.\n\nIf authentication is disabled, the second and fourth strings have the same value.\nThey may differ only if a user is authenticated and has chosen to override the language setting.\n\n==== HTTP Status codes\n; ''200''\n: Retrieval was successful.\n The response body contains an appropriate site info object.\n; ''400''\n: The value of the query parameter ''data'' is unknown."))