Commands

Every command, argument and option of dip 0.5.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: the host, without /api/v1 (http/https only) https://search.dip.bundestag.de
--api-key <key> DIP API key (prefer `dip config set api-key` or the DIP_API_KEY env var; a flag is visible in ps/history)
--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 (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
-o, --output <file> write the JSON output to this file instead of stdout (- = stdout)
--force with -o, overwrite the output file if it already exists

dip obtain-key

Obtain the DIP API key and check it still works. DIP rotates its published key, so the candidate is verified against the live API before it is printed; if no published key is accepted the command fails and points at https://dip.bundestag.de/über-dip/hilfe/api.

dip obtain-key [options]

Options

OptionDescriptionDefault
--export print "export DIP_API_KEY=<key>" for use with eval
--no-verify skip the live check and print the published candidate unchecked

dip config

the API key, kept in a credentials file of its own: $XDG_CONFIG_HOME/dip-bundestag/credentials, else ~/.config/dip-bundestag/credentials (api-key)

dip config set

store a credential: typed at a prompt without echo, or piped in (dip obtain-key | dip config set api-key) — never given as an argument

dip config set [options] <name>

Arguments

<name> required
api-key

dip config get

show a stored credential, masked (abcd…wxyz, or **** below 20 characters) unless --reveal

dip config get [options] <name>

Arguments

<name> required
api-key

Options

OptionDescriptionDefault
--reveal print the whole value, for a script that passes it on — it then is on your screen or in its log

dip config unset

remove a stored credential

dip config unset [options] <name>

Arguments

<name> required
api-key

dip config list

every stored credential, masked, and where the file is

dip config list [options]

dip vorgang

Vorgänge (procedures)

dip vorgang list

List/filter vorgang

dip vorgang list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of vorgang's f.* filters)

dip vorgang get

Get one vorgang by id

dip vorgang get [options] <id>

Arguments

<id> required

dip vorgangsposition

Vorgangspositionen

dip vorgangsposition list

List/filter vorgangsposition

dip vorgangsposition list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of vorgangsposition's f.* filters)

dip vorgangsposition get

Get one vorgangsposition by id

dip vorgangsposition get [options] <id>

Arguments

<id> required

dip drucksache

Drucksachen (printed papers)

dip drucksache list

List/filter drucksache

dip drucksache list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of drucksache's f.* filters)

dip drucksache get

Get one drucksache by id

dip drucksache get [options] <id>

Arguments

<id> required

dip drucksache-text

Drucksachen with full text

dip drucksache-text list

List/filter drucksache-text

dip drucksache-text list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of drucksache-text's f.* filters)

dip drucksache-text get

Get one drucksache-text by id

dip drucksache-text get [options] <id>

Arguments

<id> required

dip plenarprotokoll

Plenarprotokolle

dip plenarprotokoll list

List/filter plenarprotokoll

dip plenarprotokoll list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of plenarprotokoll's f.* filters)

dip plenarprotokoll get

Get one plenarprotokoll by id

dip plenarprotokoll get [options] <id>

Arguments

<id> required

dip plenarprotokoll-text

Plenarprotokolle with full text

dip plenarprotokoll-text list

List/filter plenarprotokoll-text

dip plenarprotokoll-text list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of plenarprotokoll-text's f.* filters)

dip aktivitaet

Aktivitäten

dip aktivitaet list

List/filter aktivitaet

dip aktivitaet list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of aktivitaet's f.* filters)

dip aktivitaet get

Get one aktivitaet by id

dip aktivitaet get [options] <id>

Arguments

<id> required

dip person

Personen (members)

dip person list

List/filter person

dip person list [options]

Options

OptionDescriptionDefault
--cursor <cursor> pagination cursor from a previous page; repeat that page's --filter/--id with it
--id <id> filter by id, a whole number (repeatable -> f.id)
--filter <key=value> DIP filter, e.g. f.titel=Klima (repeatable; one of person's f.* filters)

dip person get

Get one person by id

dip person get [options] <id>

Arguments

<id> required