title: API: Metadata key information
role: manual
tags: #api #manual #zettelstore
syntax: zmk
back: 00001012000000 00001012070500
backward: 00001012000000 00001012070500
box-name: manual
copyright: (c) 2020-present by Detlef Stern <ds@zettelstore.de>
created: 20220304164242
forward: 00001006020000 00001006030000 00001006031500 00001010040100
lang: en
license: EUPL-1.2-or-later
modified: 20261119135211
published: 20261119135211
visibility: public

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).

    # 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:

1. The name of the key, i.e. its string representation (string).
1. The name of the type of the key (string), as used in [Supported Key Types](00001006030000), e.g. `"IdentifierSet"`.
1. `T`, if the type is a set type, i.e. the value is a set of elements, otherwise `()`.
1. `T`, if the key is managed, i.e. the value is set and maintained by Zettelstore and stored in the zettel, otherwise `()`.
1. `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 &ldquo;user&rdquo;: 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

