From 66308b4a6cc5b6d0fe65099679bbb8f9f4dd0d24 Mon Sep 17 00:00:00 2001 From: Michel Peltriaux Date: Fri, 28 Jan 2022 14:39:43 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eapi-v1-ema-post=5Fde=E2=80=9C=20hinzuf?= =?UTF-8?q?=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-v1-ema-post_de.md | 103 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 api-v1-ema-post_de.md diff --git a/api-v1-ema-post_de.md b/api-v1-ema-post_de.md new file mode 100644 index 0000000..dd0a319 --- /dev/null +++ b/api-v1-ema-post_de.md @@ -0,0 +1,103 @@ +## Spezifikation +### EMA +#### Codes +Folgende Attribute referenzieren die `atomId` eines oKey Eintrags für EMA: +1. `biotope` +2. `action` +3. `conservation_office` + +#### POST +Mit `POST` kann eine neue EMA angelegt werden. Die Daten werden im Request body als `application/json` gesendet. War der Request erfolgreich, erhält der Sender die `id` des neu angelegten Eintrags. + +`/api/v1/ema` + +#### Beispiel Body + +```json +{ + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + 7.845568656921382, + 50.79829702304368 + ], + [ + 7.837371826171871, + 50.80155187891526 + ], + [ + 7.835698127746578, + 50.805267562209806 + ], + [ + 7.841062545776364, + 50.806623577403386 + ], + [ + 7.848916053771969, + 50.808359219420474 + ], + [ + 7.855696678161618, + 50.807057493952975 + ], + [ + 7.854666709899899, + 50.80423696434001 + ], + [ + 7.850461006164548, + 50.80217570040005 + ], + [ + 7.845568656921382, + 50.79829702304368 + ] + ] + ] + ], + "properties": { + "title": "Tolles EMA", + "responsible": { + "conservation_office": "710123", + "conservation_file_number": "unbekannt", + "handler": "Firma XY" + }, + "before_states": [ + { + "biotope": "136156", + "surface": 1.0 + } + ], + "after_states": [ + { + "biotope": "136164", + "surface": 1.0 + } + ], + "actions": [ + { + "action": "709234", + "amount": 1.0, + "unit": "cm", + "comment": "" + } + ], + "deadlines": [] + } + } + +``` + + + + +#### Beispiel Response +```json +{ + "id": "75c656e3-fdb9-46d5-bbd2-8dd26b6d295f" +} + +``` \ No newline at end of file