Commands

Every command, argument and option of pegel 0.6.1, read from the CLI itself.

Global options

These options work with every command.

OptionDescriptionDefault
-V, --version output the version number
--base-url <url> API base URL https://www.pegelonline.wsv.de
--timeout <ms> time limit per request in milliseconds, whole response included
--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

pegel stations

Measuring stations

pegel stations list

List/filter stations

pegel stations list [options]

Options

OptionDescriptionDefault
--ids <id> station id (uuid/number/shortname/longname); repeatable
--waters <shortname> filter by water shortname (see `waters`)
--fuzzy-id <id> fuzzy id match
--include-timeseries embed each station's timeseries list
--include-current embed the current measurement in each timeseries (implies --include-timeseries)
--include-characteristic embed characteristic (gauge-mark) values in each timeseries (implies --include-timeseries)
--include-forecast also list forecast series (WV, water-level forecast) in the timeseries list (implies --include-timeseries)

pegel stations get

Get one station by uuid/number/shortname/longname

pegel stations get [options] <station>

Arguments

<station> required
station uuid, number, shortname or longname

Options

OptionDescriptionDefault
--include-timeseries embed each station's timeseries list
--include-current embed the current measurement in each timeseries (implies --include-timeseries)
--include-characteristic embed characteristic (gauge-mark) values in each timeseries (implies --include-timeseries)
--include-forecast also list forecast series (WV, water-level forecast) in the timeseries list (implies --include-timeseries)

pegel timeseries

Timeseries metadata (timeseries defaults to 'W' = water level)

pegel timeseries [options] <station> [timeseries]

Arguments

<station> required
station uuid, number, shortname or longname
[timeseries] optional
timeseries shortname, e.g. W (water level) or Q (flow)

pegel current

The current measurement (timeseries defaults to 'W')

pegel current [options] <station> [timeseries]

Arguments

<station> required
station uuid, number, shortname or longname
[timeseries] optional
timeseries shortname, e.g. W (water level) or Q (flow)

pegel measurements

A window of measurements (timeseries defaults to 'W')

pegel measurements [options] <station> [timeseries]

Arguments

<station> required
station uuid, number, shortname or longname
[timeseries] optional
timeseries shortname, e.g. W (water level) or Q (flow)

Options

OptionDescriptionDefault
--start <iso> window start: ISO-8601 instant, or a period like P7D
--end <iso> window end: ISO-8601 instant

pegel waters

List all bodies of water (Gewässer)

pegel waters [options]