„api-v1-compensation-post_de“ hinzufügen
parent
652028acf5
commit
37cc76a13e
104
api-v1-compensation-post_de.md
Normal file
104
api-v1-compensation-post_de.md
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
## Spezifikation
|
||||||
|
### Kompensation
|
||||||
|
#### Codes
|
||||||
|
Folgende Attribute referenzieren die `atomId` eines oKey Eintrags für Eingriffe:
|
||||||
|
1. `biotope`
|
||||||
|
2. `action`
|
||||||
|
|
||||||
|
#### POST
|
||||||
|
Mit `POST` kann eine neue Kompensation angelegt werden. Die Kompensationsdaten werden im Request body als `application/json` gesendet. War der Request erfolgreich, erhält der Sender die `id` des neu angelegten Eintrags.
|
||||||
|
|
||||||
|
**Achtung**: Eine Kompensation kann nur angelegt werden, wenn der zugehörige Eingriff bereits existiert und referenziert wird.
|
||||||
|
|
||||||
|
`/api/v1/compensation`
|
||||||
|
|
||||||
|
#### Beispiel Body
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "MultiPolygon",
|
||||||
|
"coordinates": [
|
||||||
|
[
|
||||||
|
[
|
||||||
|
[
|
||||||
|
7.477097511291501,
|
||||||
|
50.14218444767971
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.479243278503415,
|
||||||
|
50.140479182654374
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.483620643615721,
|
||||||
|
50.14300955409459
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.482976913452146,
|
||||||
|
50.14405466845533
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.481346130371092,
|
||||||
|
50.14416467916495
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.479929924011228,
|
||||||
|
50.143174573669675
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.47808456420898,
|
||||||
|
50.14232196640389
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.477097511291501,
|
||||||
|
50.14218444767971
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"title": "Tolle Kompensation",
|
||||||
|
"is_cef": false,
|
||||||
|
"is_coherence_keeping": false,
|
||||||
|
"intervention": "97d7cce8-83e9-4043-bc76-317caf983a41",
|
||||||
|
"before_states": [
|
||||||
|
{
|
||||||
|
"biotope": "136156",
|
||||||
|
"surface": 1000.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"after_states": [
|
||||||
|
{
|
||||||
|
"biotope": "136204",
|
||||||
|
"surface": 1000.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"action": "709452",
|
||||||
|
"amount": 1000.0,
|
||||||
|
"unit": "qm",
|
||||||
|
"comment": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"deadlines": [
|
||||||
|
{
|
||||||
|
"type": "finished",
|
||||||
|
"date": "2022-01-31",
|
||||||
|
"comment": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Beispiel Response
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "75c656e3-fdb9-46d5-bbd2-8dd26b6d295f"
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user