Add flood observations to a layer
add_observationsAdd flood observations (flood marks, timed levels, gauge records, dry points) to a Hydrata observation layer; invalid rows are rejected while valid rows still save.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"layer_id": "<layer_id>",
"observations": "<observations>"
},
"name": "add_observations"
}
}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 100 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 | |||