{"openapi":"3.1.0","info":{"title":"Landskab.ai API","version":"1.0.0","description":"REST API exposing the actions of the Landskab.ai product. Authenticate with a Kavaro API key as a bearer token."},"servers":[{"url":"https://kavaro.ai"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"A Kavaro API key (user- or organization-scoped)."}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/api/rest/actions/list_projects":{"post":{"operationId":"list_projects","summary":"List projects","description":"List the organization's landscape-analysis projects (id, name, type, status, deadline). Use this to find a project's id before inspecting or editing it.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:view"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/get_project":{"post":{"operationId":"get_project","summary":"Inspect project","description":"Get a full snapshot of one project and ALL its child records — alternatives, sources, character areas, viewpoints, field registrations & trips, analysis sections, impact assessments, visualizations, maps, report sections and timeline — each WITH its id. Use this to inspect data and obtain the ids needed to edit/delete specific records.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:view"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project to inspect"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_project":{"post":{"operationId":"create_project","summary":"Create project","description":"Create a new landscape-analysis project for the current organization.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The project name"},"projectType":{"description":"Project type; defaults to municipality","type":"string","enum":["municipality","facility_impact","siting"]},"deadline":{"description":"Optional project deadline (ISO 8601)"}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_project":{"post":{"operationId":"update_project","summary":"Update project","description":"Update a project's setup, plan or generated text: name, type, status, study area, aims, deadline, the plan's purpose and method, the baseline landscape description, and/or the overall recommendation/conclusion. To author the baseline or recommendation, write the prose yourself and set it here — do not call a one-shot generator.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project to update"},"name":{"description":"New project name","type":"string","minLength":1},"projectType":{"description":"New project type","type":"string","enum":["municipality","facility_impact","siting"]},"status":{"description":"New status","type":"string","enum":["draft","active","on_hold","completed","archived"]},"studyArea":{"description":"The study area / project boundary","type":"object","properties":{"description":{"description":"Free-text description of the study area / project boundary","type":"string"},"bbox":{"description":"Optional bounding box [minLng, minLat, maxLng, maxLat]","minItems":4,"maxItems":4,"type":"array","items":{"type":"number"}},"geometry":{"description":"Optional GeoJSON geometry of the project boundary"}},"additionalProperties":false},"aims":{"description":"The project aims as bullet points or free text","type":"string"},"purpose":{"description":"The plan's purpose description","type":"string"},"method":{"description":"The plan's LKM method description","type":"string"},"baseline":{"description":"The baseline landscape description (LKM Kortlægning)","type":"string"},"recommendation":{"description":"The project's overall recommendation / conclusion","type":"string"},"deadline":{"description":"New deadline, or null to clear it","anyOf":[{},{"type":"null"}]}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_project":{"post":{"operationId":"delete_project","summary":"Delete project","description":"Delete a landscape-analysis project and all of its sources, alternatives, field records, analysis and visualizations.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project to delete"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_timeline_item":{"post":{"operationId":"create_timeline_item","summary":"Add timeline item","description":"Add a single timeline / analysis-programme activity to a project.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project the activity belongs to"},"title":{"type":"string","minLength":1,"description":"Activity title"},"phase":{"description":"Phase / grouping label","type":"string"},"status":{"description":"Status; defaults to planned","type":"string","enum":["planned","in_progress","done"]},"dueAt":{"description":"Due date (ISO 8601)","anyOf":[{},{"type":"null"}]},"isMilestone":{"description":"Whether this activity is a milestone","type":"boolean"}},"required":["projectId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_timeline_item":{"post":{"operationId":"update_timeline_item","summary":"Update timeline item","description":"Update a single timeline / analysis-programme activity (title, phase, status, due date or milestone flag).","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"itemId":{"type":"string","description":"The timeline item to update"},"title":{"description":"New title","type":"string","minLength":1},"phase":{"description":"New phase, or null to clear it","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"New status","type":"string","enum":["planned","in_progress","done"]},"dueAt":{"description":"New due date, or null to clear it","anyOf":[{},{"type":"null"}]},"isMilestone":{"description":"Whether this activity is a milestone","type":"boolean"}},"required":["itemId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_timeline_item":{"post":{"operationId":"delete_timeline_item","summary":"Delete timeline item","description":"Delete a single timeline / analysis-programme activity.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"itemId":{"type":"string","description":"The timeline item to delete"}},"required":["itemId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/reorder_timeline_items":{"post":{"operationId":"reorder_timeline_items","summary":"Reorder timeline items","description":"Set the display order of a project's timeline / analysis-programme activities. Pass the activity ids in the desired order; each item's sort order is updated to match.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project whose timeline is being reordered"},"itemIds":{"minItems":1,"type":"array","items":{"type":"string"},"description":"All timeline item ids in the desired display order"}},"required":["projectId","itemIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/set_study_area":{"post":{"operationId":"set_study_area","summary":"Set study area","description":"Set the project's study area: a description and/or a bounding box (used to fetch authority data for the area). Bbox is [minX, minY, maxX, maxY], default CRS EPSG:25832 (the native Danish CRS).","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project to update"},"description":{"description":"Free-text description of the study area","type":"string"},"bbox":{"description":"Bounding box [minX, minY, maxX, maxY]","minItems":4,"maxItems":4,"type":"array","items":{"type":"number"}},"crs":{"description":"CRS of the bbox; defaults to EPSG:25832","type":"string","enum":["EPSG:25832","EPSG:4326"]}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/add_source":{"post":{"operationId":"add_source","summary":"Add source","description":"Register an uploaded source document/map for a project (the file itself is uploaded separately and attached to the returned source). Optionally tag it to an alternative.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project the source belongs to"},"title":{"type":"string","minLength":1,"description":"A short title for the source"},"kind":{"description":"The kind of source; defaults to other","type":"string","enum":["municipal_plan","prior_analysis","municipal_atlas","plan_material","map","historical_map","project_drawing","technical_description","plan_description","other"]},"description":{"description":"Optional notes about the source","type":"string"},"alternativeId":{"description":"Optional alternative to tag the source to","type":"string"}},"required":["projectId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_source":{"post":{"operationId":"update_source","summary":"Update source","description":"Update a source's title, kind, description or alternative tag.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceId":{"type":"string","description":"The source to update"},"title":{"description":"New title","type":"string","minLength":1},"kind":{"description":"New kind","type":"string","enum":["municipal_plan","prior_analysis","municipal_atlas","plan_material","map","historical_map","project_drawing","technical_description","plan_description","other"]},"description":{"description":"New description","type":"string"},"alternativeId":{"description":"New alternative tag, or null to clear it","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sourceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_source":{"post":{"operationId":"delete_source","summary":"Delete source","description":"Delete a source and its attached file.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceId":{"type":"string","description":"The source to delete"}},"required":["sourceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_alternative":{"post":{"operationId":"create_alternative","summary":"Add alternative","description":"Create a project alternative (a competing option being assessed): a road/rail alignment, a facility layout, or a candidate siting location.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project the alternative belongs to"},"name":{"type":"string","minLength":1,"description":"The alternative name"},"kind":{"description":"The kind of alternative","type":"string","enum":["alignment","layout","location","other"]},"description":{"description":"Optional description","type":"string"}},"required":["projectId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_alternative":{"post":{"operationId":"update_alternative","summary":"Update alternative","description":"Update an alternative's name, kind, description, facility description and/or landscape requirements. To author the facility description or landscape requirements, write the prose yourself and set it here — do not call a one-shot generator.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"alternativeId":{"type":"string","description":"The alternative to update"},"name":{"description":"New name","type":"string","minLength":1},"kind":{"description":"New kind","type":"string","enum":["alignment","layout","location","other"]},"description":{"description":"New description","type":"string"},"facilityDescription":{"description":"Description of the facility/alternative","type":"string"},"landscapeRequirements":{"description":"What the facility requires of the landscape (siting projects)","type":"string"}},"required":["alternativeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_alternative":{"post":{"operationId":"delete_alternative","summary":"Delete alternative","description":"Delete an alternative (its sources are kept but untagged).","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"alternativeId":{"type":"string","description":"The alternative to delete"}},"required":["alternativeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/list_authority_datasets":{"post":{"operationId":"list_authority_datasets","summary":"List authority datasets","description":"List the Danish authority datasets that can be acquired for this project (Plandata, Miljøportal, Dataforsyningen, Kulturarv/SLKS), grouped by LKM category, with each provider's connection status.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:view"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project to list datasets for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/acquire_authority_data":{"post":{"operationId":"acquire_authority_data","summary":"Acquire authority data","description":"Fetch one or more authority datasets for the project's study area and store each as a source (with the fetched GeoJSON attached). Requires the study area to have a bounding box. Use list_authority_datasets to see available dataset keys.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project to acquire data for"},"datasetKeys":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Dataset keys from list_authority_datasets"},"alternativeId":{"description":"Optional alternative to tag the acquired sources to","type":"string"}},"required":["projectId","datasetKeys"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/start_analysis":{"post":{"operationId":"start_analysis","summary":"Start analysis","description":"Seed the project's guided LKM analysis sections (nature, culture, cultural-history, spatial/visual, bindings, planning frameworks) with default checklists. Idempotent — existing sections are kept.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project to start the analysis for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_analysis_section":{"post":{"operationId":"update_analysis_section","summary":"Update analysis section","description":"Update an analysis section's title, content text and/or checklist.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sectionId":{"type":"string","description":"The analysis section to update"},"title":{"description":"New title","type":"string","minLength":1},"content":{"description":"New analysis text","type":"string"},"checklist":{"description":"Replacement checklist items","type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"checked":{"type":"boolean"},"note":{"type":"string"}},"required":["label"],"additionalProperties":false}}},"required":["sectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_character_area":{"post":{"operationId":"create_character_area","summary":"Add character area","description":"Create a landscape character area (landskabskarakterområde) for a project.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project the character area belongs to"},"name":{"type":"string","minLength":1,"description":"The character-area name"},"summary":{"description":"A short summary of its character","type":"string"},"geometry":{"description":"Optional GeoJSON Polygon boundary (EPSG:4326)"}},"required":["projectId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_character_area":{"post":{"operationId":"update_character_area","summary":"Update character area","description":"Update a character area's name, summary, boundary geometry, or per-theme notes.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The character area to update"},"name":{"description":"New name","type":"string","minLength":1},"summary":{"description":"New summary","type":"string"},"geometry":{"description":"New GeoJSON Polygon boundary (EPSG:4326)"},"natureNotes":{"type":"string"},"cultureNotes":{"type":"string"},"culturalHistoryNotes":{"type":"string"},"spatialVisualNotes":{"type":"string"},"keyCharacteristics":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_character_area":{"post":{"operationId":"delete_character_area","summary":"Delete character area","description":"Delete a character area.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The character area to delete"}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/generate_map":{"post":{"operationId":"generate_map","summary":"Produce map","description":"Render a map image of one or more authority datasets (which must share a provider) over the project's study area, or over a character area's boundary if linked. Stores the image as a map. Use list_authority_datasets for dataset keys.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project the map belongs to"},"title":{"type":"string","minLength":1,"description":"A title for the map"},"datasetKeys":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Map-capable dataset keys, all from the same provider"},"characterAreaId":{"description":"Optional character area whose boundary defines the extent","type":"string"},"analysisSectionId":{"description":"Optional analysis section to link the map to","type":"string"},"theme":{"description":"Optional LKM theme label for grouping","type":"string"}},"required":["projectId","title","datasetKeys"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_map":{"post":{"operationId":"delete_map","summary":"Delete map","description":"Delete a produced map and its image.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mapId":{"type":"string","description":"The map to delete"}},"required":["mapId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/add_field_registration":{"post":{"operationId":"add_field_registration","summary":"Add field registration","description":"Record a geotagged observation from a field trip: a photo, note, or viewpoint visit. kind: photo | note | observation | viewpoint.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project"},"kind":{"description":"Record kind; defaults to note","type":"string","enum":["photo","note","observation","viewpoint"]},"label":{"description":"Short label","type":"string"},"note":{"description":"Note or observation text","type":"string"},"lat":{"description":"Latitude (WGS84)","type":"number"},"lng":{"description":"Longitude (WGS84)","type":"number"},"heading":{"description":"Camera/view compass bearing 0–360","type":"number","minimum":0,"maximum":360},"tripNumber":{"description":"Field trip number (the trip's ordinal)","type":"integer","minimum":1,"maximum":9007199254740991},"characterAreaId":{"description":"Character area this observation belongs to","type":"string"},"viewpointId":{"description":"Planned viewpoint this record fulfils","type":"string"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_field_registration":{"post":{"operationId":"update_field_registration","summary":"Update field registration","description":"Update a field registration record.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"registrationId":{"type":"string","description":"The registration to update"},"kind":{"type":"string","enum":["photo","note","observation","viewpoint"]},"label":{"type":"string"},"note":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"heading":{"type":"number","minimum":0,"maximum":360},"tripNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"characterAreaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewpointId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["registrationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_field_registration":{"post":{"operationId":"delete_field_registration","summary":"Delete field registration","description":"Delete a field registration record and its attached photo.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"registrationId":{"type":"string","description":"The registration to delete"}},"required":["registrationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_field_trip":{"post":{"operationId":"create_field_trip","summary":"Create field trip","description":"Define a field trip on a project (LKM requires at least two): who should go, when, and notes.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project"},"label":{"description":"Trip name/label","type":"string"},"scheduledAt":{"description":"When the trip happens (ISO 8601)"},"participants":{"description":"Who should go (names)","type":"array","items":{"type":"string"}},"notes":{"description":"Trip objectives / notes","type":"string"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_field_trip":{"post":{"operationId":"update_field_trip","summary":"Update field trip","description":"Update a field trip's label, date, participants or notes.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tripId":{"type":"string","description":"The trip to update"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduledAt":{"anyOf":[{},{"type":"null"}]},"participants":{"type":"array","items":{"type":"string"}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["tripId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_field_trip":{"post":{"operationId":"delete_field_trip","summary":"Delete field trip","description":"Delete a field trip. LKM requires at least two trips, so deleting below two is blocked.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tripId":{"type":"string","description":"The trip to delete"}},"required":["tripId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_viewpoint":{"post":{"operationId":"create_viewpoint","summary":"Add viewpoint","description":"Create a planned photo viewpoint to document during field trips.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project"},"label":{"type":"string","minLength":1,"description":"A short label for the viewpoint"},"description":{"description":"What to capture and why","type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"heading":{"description":"Intended camera bearing","type":"number","minimum":0,"maximum":360},"characterAreaId":{"description":"Character area this viewpoint belongs to","type":"string"}},"required":["projectId","label"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_viewpoint":{"post":{"operationId":"update_viewpoint","summary":"Update viewpoint","description":"Update a planned viewpoint.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"viewpointId":{"type":"string","description":"The viewpoint to update"},"label":{"type":"string","minLength":1},"description":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"heading":{"type":"number","minimum":0,"maximum":360},"characterAreaId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["viewpointId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_viewpoint":{"post":{"operationId":"delete_viewpoint","summary":"Delete viewpoint","description":"Delete a planned viewpoint.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"viewpointId":{"type":"string","description":"The viewpoint to delete"}},"required":["viewpointId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/assess_character_area":{"post":{"operationId":"assess_character_area","summary":"Assess character area","description":"Record the LKM assessment of a landscape character area (municipality: strength/condition/vulnerability/special visual experiences).","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","description":"The character area to assess"},"strength":{"description":"Landscape character strength (high/medium/low or free text)","type":"string"},"condition":{"description":"Landscape condition / state of preservation","type":"string"},"vulnerability":{"description":"Sensitivity to change / vulnerability","type":"string"},"specialVisualExperiences":{"description":"Special visual experiences or scenic values","type":"string"}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_impact_assessment":{"post":{"operationId":"create_impact_assessment","summary":"Add impact assessment","description":"Create an impact assessment record for a character area (optionally per alternative) for facility_impact or siting projects.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project"},"characterAreaId":{"type":"string","description":"The character area"},"alternativeId":{"description":"The alternative being assessed (if applicable)","type":"string"},"impactDescription":{"description":"Description of the visual/landscape impact","type":"string"},"mitigationNotes":{"description":"Proposed mitigation measures","type":"string"},"rating":{"description":"Impact rating","type":"string","enum":["low","medium","high","significant"]}},"required":["projectId","characterAreaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_impact_assessment":{"post":{"operationId":"update_impact_assessment","summary":"Update impact assessment","description":"Update an impact assessment record.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"assessmentId":{"type":"string","description":"The impact assessment to update"},"impactDescription":{"type":"string"},"mitigationNotes":{"type":"string"},"rating":{"type":"string","enum":["low","medium","high","significant"]}},"required":["assessmentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_impact_assessment":{"post":{"operationId":"delete_impact_assessment","summary":"Delete impact assessment","description":"Delete an impact assessment record.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"assessmentId":{"type":"string","description":"The impact assessment to delete"}},"required":["assessmentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/create_visualization":{"post":{"operationId":"create_visualization","summary":"Add visualization","description":"Create a visualization entry (photo viewpoint, before/after, impression) for a project.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","description":"The project"},"title":{"type":"string","minLength":1,"description":"Title of the visualization"},"description":{"description":"What this visualization shows","type":"string"},"characterAreaId":{"description":"Linked character area","type":"string"},"alternativeId":{"description":"Linked alternative","type":"string"},"viewpointId":{"description":"Linked planned viewpoint","type":"string"}},"required":["projectId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_visualization":{"post":{"operationId":"update_visualization","summary":"Update visualization","description":"Update a visualization's title, description or AI description.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"visualizationId":{"type":"string","description":"The visualization to update"},"title":{"type":"string","minLength":1},"description":{"type":"string"},"aiDescription":{"type":"string"},"characterAreaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"alternativeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewpointId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["visualizationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/delete_visualization":{"post":{"operationId":"delete_visualization","summary":"Delete visualization","description":"Delete a visualization entry and its attached files.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"visualizationId":{"type":"string","description":"The visualization to delete"}},"required":["visualizationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}},"/api/rest/actions/update_report_section":{"post":{"operationId":"update_report_section","summary":"Update report section","description":"Manually edit the content of a report section.","tags":["actions"],"security":[{"ApiKeyAuth":[]}],"x-required-permissions":["projects:edit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sectionId":{"type":"string","description":"The report section to update"},"title":{"description":"New title","type":"string","minLength":1},"content":{"description":"New content (Markdown)","type":"string"}},"required":["sectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid API key"},"403":{"description":"The key may not invoke this action"},"404":{"description":"Unknown action"}}}}}}