6 api v1 ema post_de
mpeltriaux edited this page 2023-02-23 11:00:20 +01:00

Spezifikation

EMA

Codes

Folgende Attribute referenzieren die Id 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

{
        "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": {
                    "type": "710178",
                    "detail": "Firma Mustermann234"
                }
            },
            "before_states": [
                {
                    "biotope": "136156",
                    "biotope_details": [ 
                        "138046", 
                        "161751"
                    ],
                    "surface": 1.0
                }
            ],
            "after_states": [
                {
                    "biotope": "136164",
                    "biotope_details": [],
                    "surface": 1.0
                }
            ],
            "actions": [
                {
                    "action_types": [
                        "709297",
                        "709289",
                        "709299"
                    ],
                    "action_details": [],
                    "amount": 1.0,
                    "unit": "cm",
                    "comment": ""
                }
            ],
            "deadlines": [
                {
                    "type": "finished",
                    "date": "2022-01-31",
                    "comment": ""
                }
            ]
        }
    }
    

Beispiel Response

{
    "id": "75c656e3-fdb9-46d5-bbd2-8dd26b6d295f"
}