„api-v1-ema-post_de“ hinzufügen

Michel Peltriaux 2022-01-28 14:39:43 +01:00
parent 3cd91130a0
commit 66308b4a6c

103
api-v1-ema-post_de.md Normal file

@ -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"
}
```