Befehle

Alle Befehle, Argumente und Optionen von mastr 0.5.1, direkt aus der CLI gelesen.

Die Beschreibungen der Befehle, Argumente und Optionen stammen direkt aus der CLI und sind englisch.

Globale Optionen

Diese Optionen gelten für jeden Befehl.

OptionBeschreibungStandard
-V, --version output the version number
--base-url <url> API base URL (http/https only) https://www.marktstammdatenregister.de/MaStR
--timeout <ms> time limit per request in ms, whole response included (0 = no timeout)
--user-agent <ua> User-Agent header value
--max-retries <n> retries for transient 429/503 responses and reset connections (0..10; each waits the server's Retry-After, up to 30 s)
--max-response-bytes <n> cap response body size in bytes (0 = unlimited; default 100 MiB)
--log-format <format> how errors, warnings and notes are written to stderr: text (log4j style: time, level, [topic], message) or jsonl (one JSON object per line: ts, level, topic, msg); default text
--compact print JSON on a single line instead of pretty-printed
--iso-dates rewrite MaStR /Date(ms)/ timestamps to ISO-8601: dates as YYYY-MM-DD, times in German time with their offset (2026-10-06T10:40:00+02:00)

mastr stromerzeugung

Electricity-generation units (Stromerzeugung)

mastr stromerzeugung [options]

Optionen

OptionBeschreibungStandard
--page <n> 1-based page number 1
--page-size <n> rows per page (1..5000) 25
--sort <spec> sort: FieldKey-asc | FieldKey-desc, where FieldKey is a record field name, not a FilterName (e.g. Bruttoleistung-desc)
--filter <spec> filter: FilterName~op~'value'~and~… (see `filters`; ops eq|neq|sw|ct|nct|ew|null|nn|gt|lt, gt/lt strict; null/nn take ''). A malformed spec, an unknown op, a FilterName the category doesn't have or a dropdown code it doesn't list is rejected. Repeatable: several --filter are joined with ~and~. No ~or~: for several dropdown codes use one comma list, e.g. Energieträger~eq~'2497,2498'
--total print only the total match count, not the rows (a one-row request; --page and --page-size are ignored)

mastr stromverbrauch

Electricity-consumption units (Stromverbrauch)

mastr stromverbrauch [options]

Optionen

OptionBeschreibungStandard
--page <n> 1-based page number 1
--page-size <n> rows per page (1..5000) 25
--sort <spec> sort: FieldKey-asc | FieldKey-desc, where FieldKey is a record field name, not a FilterName (e.g. InbetriebnahmeDatum-desc)
--filter <spec> filter: FilterName~op~'value'~and~… (see `filters`; ops eq|neq|sw|ct|nct|ew|null|nn|gt|lt, gt/lt strict; null/nn take ''). A malformed spec, an unknown op, a FilterName the category doesn't have or a dropdown code it doesn't list is rejected. Repeatable: several --filter are joined with ~and~. No ~or~: for several dropdown codes use one comma list, e.g. Energieträger~eq~'2497,2498'
--total print only the total match count, not the rows (a one-row request; --page and --page-size are ignored)

mastr gaserzeugung

Gas-generation units (Gaserzeugung)

mastr gaserzeugung [options]

Optionen

OptionBeschreibungStandard
--page <n> 1-based page number 1
--page-size <n> rows per page (1..5000) 25
--sort <spec> sort: FieldKey-asc | FieldKey-desc, where FieldKey is a record field name, not a FilterName (e.g. Erzeugungsleistung-desc)
--filter <spec> filter: FilterName~op~'value'~and~… (see `filters`; ops eq|neq|sw|ct|nct|ew|null|nn|gt|lt, gt/lt strict; null/nn take ''). A malformed spec, an unknown op, a FilterName the category doesn't have or a dropdown code it doesn't list is rejected. Repeatable: several --filter are joined with ~and~. No ~or~: for several dropdown codes use one comma list, e.g. Energieträger~eq~'2497,2498'
--total print only the total match count, not the rows (a one-row request; --page and --page-size are ignored)

mastr gasverbrauch

Gas-consumption units (Gasverbrauch)

mastr gasverbrauch [options]

Optionen

OptionBeschreibungStandard
--page <n> 1-based page number 1
--page-size <n> rows per page (1..5000) 25
--sort <spec> sort: FieldKey-asc | FieldKey-desc, where FieldKey is a record field name, not a FilterName (e.g. MaximaleGasbezugsLeistung-desc)
--filter <spec> filter: FilterName~op~'value'~and~… (see `filters`; ops eq|neq|sw|ct|nct|ew|null|nn|gt|lt, gt/lt strict; null/nn take ''). A malformed spec, an unknown op, a FilterName the category doesn't have or a dropdown code it doesn't list is rejected. Repeatable: several --filter are joined with ~and~. No ~or~: for several dropdown codes use one comma list, e.g. Energieträger~eq~'2497,2498'
--total print only the total match count, not the rows (a one-row request; --page and --page-size are ignored)

mastr filters

List the filterable columns (names, types, dropdown codes) for a category

mastr filters [options] <category>

Argumente

<category> erforderlich
unit category