Add flood observations to a layer
add_observationsAdd flood observations (marks, timed levels, gauge records, dry points) to a layer, validating each row and reporting rejected rows or stopped batches.
Instructions
Add flood observations (Flood mark, Timed level, Gauge record, Dry point) to a layer.
POSTs each observation to /projects//flood-observations//observations/
in order. The API validates every field: a row it refuses (400) is listed in
rejected with its problems and the rest still land; a refusal that is not
about the row (403 not an Editor, 404, 409) stops the batch and is reported in
stopped, with not_sent_count. Stages are on the LAYER's vertical datum.
Photos are not part of an observation: attach a link with add_observation_photo_link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| srid | No | EPSG code for every geometry that does not carry its own `srid` (the projected CRS its eastings/northings are in, e.g. a UTM zone); omit for [lon, lat] (EPSG:4326) | |
| layer_id | Yes | The flood observation layer id (create_observation_layer / list_observations) | |
| project_id | Yes | The project ID | |
| observations | Yes | Observations, each the API write body: subtype (flood_mark | timed_level | gauge_record | dry_point), name (required: a short label, e.g. the survey mark id), geometry {type: Point, coordinates: [lon, lat]} (or native x/y with srid), value_kind (stage | depth) + stage_m or depth_m, uncertainty_grade (H/M/L) or uncertainty_m, bound (exact | at_least | at_most), observed_start/observed_end (ISO 8601; naive times read in entry_timezone, by default the project's own zone), mark_type, flood_name, source, licence, notes; a flood_mark or dry_point must say which flood it is: a date window (observed_start / observed_end) or flood_name (ask the user; never guess a date); a gauge_record needs data_timeseries_id (+ gauge_zero_m). At most 200 per call | |
| entry_timezone | No | IANA zone for naive observed_start/observed_end on rows that do not carry their own entry_timezone; omit to use the project's zone (derived from where the project is, reported back as entry_timezone). Give it only when the times were read elsewhere |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||