title: API: Metadata key information role: manual tags: #api #manual #zettelstore syntax: zmk To retrieve information about metadata keys, send an HTTP GET request to the endpoint ''/x'' with the query parameter ''data=meta-type''. If [[authentication is enabled|00001010040100]], the caller must be authenticated and must have at least read access. Without the query parameter ''key'', information about all predefined metadata keys is returned. The order of the entries is not specified and may differ between requests. If the query parameter ''key'' is given (possibly more than once), the result contains one entry for each occurrence of ''key'', in the given order. If the same key is given more than once, the result contains the entry for that key more than once. An empty value for ''key'' is rejected with status code ''400''. The type of a key that is not predefined is derived from the suffix of its name, see [[Supported Key Types|00001006030000]]. For example, the key ''data-url'' has the type ''URL''; a key with a suffix not listed there has the type [[EString|00001006031500]]. ```sh # curl 'http://127.0.0.1:23123/x?data=meta-type&key=data-url&key=forward&key=unknown' (("data-url" "URL" () () ()) ("forward" "IdentifierSet" T () T) ("unknown" "EString" () () ())) ``` The result is a list of entries. Each entry is a list of five elements, in this order: # The name of the key, i.e. its string representation (string). # The name of the type of the key (string), as used in [[Supported Key Types|00001006030000]], e.g. ''"IdentifierSet"''. # ''T'', if the type is a set type, i.e. the value is a set of elements, otherwise ''()''. # ''T'', if the key is managed, i.e. the value is set and maintained by Zettelstore and stored in the zettel, otherwise ''()''. # ''T'', if the key is a property, i.e. the value is always calculated and never stored, otherwise ''()''. The elements 4 and 5 are never both ''T''. If both are ''()'', the key belongs to the category ""user"": the value is set by the user. See [[Supported Metadata Keys|00001006020000]] for details and for the category of each predefined key. ==== HTTP Status codes ; ''200'' : Retrieval was successful, the body contains the list. ; ''400'' : The value of the query parameter ''key'' is empty. ; ''403'' : Authentication is enabled, and the caller is not authenticated or does not have read access.