Skip to content
Navigation

Water-scenario data for a parcel

Returns water-balance scenario values (runoff, infiltration, evaporation, drinking water, wastewater and their costs) for one parcel column of the waterscenario2 table: the ten S<scenario_num>_* rows plus the ten S0_* baseline rows (ten rows in total when scenario_num is 0 or names no scenario).

Both inputs are validated before the database is queried: scenario_num must be a non-negative integer and parcel_num one of the table's parcel columns. Anything else is refused with 400.

POST
https://res.aireon.ch/res_api/fb_water

Authorization

  • ResApiToken
    API key in header
    required

Request body JSON required

  • scenario_num
    integer | string
    required

    Scenario number: a non-negative integer, as a JSON number or a string of digits. Selects the S<n>_* rows; the table holds S0 to S351.

    minimum: 0 · pattern: ^[0-9]+$
  • parcel_num
    string
    required

    Parcel column of waterscenario2 to read p_val from: p_1 to p_106 (not every number has a column), p_gesamtgebiet or p_industrie_gewerbe. A name that is not a parcel column is refused with 400.

    pattern: ^[a-z_][a-z0-9_]{0,62}$

Returns

200

Water-scenario rows, or a plain-text error body (legacy error contract).

JSON
  • scenario_id
    string
    required
  • p_val
    string | null
    required

    The value of parcel_num for this scenario row, as stored (text).

HTML
Missing Token

400

scenario_num is not a non-negative integer, or parcel_num is not a parcel column of waterscenario2.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

401

Authentication missing or invalid.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

403

Wrong token.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

500

Database error (/fb_water error, please contact admin.).
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

Type to search…

↑↓ navigate↵ selectEsc close