Commands

Every command, argument and option of pegel 0.0.6, 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
--max-response-bytes <n> cap response body size in bytes (0 = unlimited; default 100 MiB)
--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
--include-characteristic embed characteristic (gauge-mark) values

pegel stations get

Get one station by uuid/number/shortname/longname

pegel stations get [options] <station>

Arguments

<station> required

Options

OptionDescriptionDefault
--include-timeseries embed each station's timeseries list
--include-current embed the current measurement
--include-characteristic embed characteristic (gauge-mark) values

pegel timeseries

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

pegel timeseries [options] <station> [timeseries]

Arguments

<station> required
[timeseries] optional

pegel current

The current measurement (timeseries defaults to 'W')

pegel current [options] <station> [timeseries]

Arguments

<station> required
[timeseries] optional

pegel measurements

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

pegel measurements [options] <station> [timeseries]

Arguments

<station> required
[timeseries] optional

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]