6 api v1 compensation get_de
mpeltriaux edited this page 2023-02-23 10:56:10 +01:00

Spezifikation

GET Response allgemein

Jeder erfolgreiche GET Request wird mit folgender Response Struktur beantwortet:

{
    "rpp": 5,
    "p": 1,
    "next": "http://example.org/api/v1/xyz/?rpp=5&p=2",
    "results": {
        ...
    }
}

Erklärung:

  • rpp: Results per page. Bestimmt wie viele Ergebnisse pro Seite zurückgeliefert werden
  • p: Page. Gibt die zurückgelieferte Seitennummer an
  • next: URL zur nächsten Seite. Sollte keine weitere Seite existieren wird hier null stehen
  • results: Die angefragten Daten.
    • Alle folgenden Response Beispiele beziehen sich auf den Inhalt von results

Request Parameter:

  • rpp: Kann direkt als GET Parameter im Request mitgegeben werden (s. next URL). Muss eine Zahl > 0 sein. Falls nicht angegeben, wird ein Standardwert verwendet
  • p: Kann direkt als GET Parameter im Request mitgegeben werden (s. next URL). Muss eine Zahl > 0 sein. Falls nicht angegeben, wird ein Standardwert verwendet

Kompensation

GET alle

/api/v1/compensation

Beispiel Response
{
    "71a0d04e-8d6a-4d95-845a-6889d920b5f6": {
        "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": {
            "id": "71a0d04e-8d6a-4d95-845a-6889d920b5f6",
            "identifier": "KOM-012022-2OOT0W",
            "title": "Tolle Kompensation",
            "created_on": "2022-01-24T13:34:18.149Z",
            "modified_on": "2022-01-24T13:34:18.149Z",
            "is_cef": false,
            "is_coherence_keeping": false,
            "intervention": {
                "id": "97d7cce8-83e9-4043-bc76-317caf983a41",
                "identifier": "EIV-12022-B6XGM9",
                "title": "Tolles Baugebiet GEÄNDERT1"
            },
            "before_states": [
                {
                    "biotope": {
                        "id": 123,
                        "long_name": "Buchenmischwald mit einheimischen Laubbaumarten",
                        "short_name": "AA2"
                    },
                    "biotope_details": [],
                    "surface": 1000.0
                }
            ],
            "after_states": [
                {
                    "biotope": {
                        "id": 4356,
                        "long_name": "Fichtenwald",
                        "short_name": "AJ0"
                    },
                    "biotope_details": [
                        {
                            "id": 6436,
                            "long_name": "dystroph",
                            "short_name": "stc"
                        }
                    ],
                    "surface": 1000.0
                }
            ],
            "actions": [
                {
                    "action_types": [
                        {
                            "id": 543,
                            "long_name": "Sonstiges (s. Erläuterungen)",
                            "short_name": null
                        }
                    ],
                    "action_details": [
                        {
                            "id": 66363,
                            "long_name": "mit Freischneider (Kehrwalze)",
                            "short_name": "Freischneider"
                        },
                        {
                            "id": 5452,
                            "long_name": "Wollschwein",
                            "short_name": "Wollschwein"
                        }
                    ],
                    "amount": 1000.0,
                    "unit": "qm",
                    "comment": ""
                }
            ],
            "deadlines": [
                {
                    "type": "finished",
                    "date": "2022-01-31",
                    "comment": ""
                }
            ]
        }
    },
    "7303afbb-693c-4623-adb0-8ab115d6bacc": {
        "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": {
            "id": "7303afbb-693c-4623-adb0-8ab115d6bacc",
            "identifier": "KOM-012022-EG28XU",
            "title": "Tolle Kompensation",
            "created_on": "2022-01-24T13:39:14.292Z",
            "modified_on": "2022-01-24T13:39:14.292Z",
            "is_cef": false,
            "is_coherence_keeping": false,
            "intervention": {
                "id": "97d7cce8-83e9-4043-bc76-317caf983a41",
                "identifier": "EIV-12022-B6XGM9",
                "title": "Tolles Baugebiet GEÄNDERT1"
            },
            "before_states": [
                {
                    "biotope": {
                        "id": 6433,
                        "long_name": "Buchenmischwald mit einheimischen Laubbaumarten",
                        "short_name": "AA2"
                    },
                    "biotope_details": [],
                    "surface": 1000.0
                }
            ],
            "after_states": [
                {
                    "biotope": {
                        "id": 46533,
                        "long_name": "Fichtenwald",
                        "short_name": "AJ0"
                    },
                    "biotope_details": [],
                    "surface": 1000.0
                }
            ],
            "actions": [
                {
                    "action_types": [
                        {
                            "id": 65463,
                            "long_name": "Sonstiges (s. Erläuterungen)",
                            "short_name": null
                        }
                    ],
                    "action_details": [
                        {
                            "id": 6375,
                            "long_name": "mit Freischneider (Kehrwalze)",
                            "short_name": "Freischneider"
                        },
                        {
                            "id": 26462,
                            "long_name": "Wollschwein",
                            "short_name": "Wollschwein"
                        }
                    ],
                    "amount": 1000.0,
                    "unit": "qm",
                    "comment": ""
                }
            ],
            "deadlines": [
                {
                    "type": "finished",
                    "date": "2022-01-31",
                    "comment": ""
                }
            ]
        }
    },
    ...
}
    

GET einzeln

/api/v1/compensation/<uuid>

Beispiel Response
{
    "128d387d-9ef5-499c-a33f-9aa0ff4ea731": {
        "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": {
            "id": "128d387d-9ef5-499c-a33f-9aa0ff4ea731",
            "identifier": "KOM-012022-UL356G",
            "title": "Tolle Kompensation1234",
            "created_on": "2022-01-24T14:01:48.620Z",
            "modified_on": "2022-01-28T07:49:42.540Z",
            "is_cef": false,
            "is_coherence_keeping": false,
            "intervention": {
                "id": "97d7cce8-83e9-4043-bc76-317caf983a41",
                "identifier": "EIV-12022-B6XGM9",
                "title": "Tolles Baugebiet GEÄNDERT1"
            },
            "before_states": [
                {
                    "biotope": {
                        "id": 7746,
                        "long_name": "Buchenmischwald mit einheimischen Laubbaumarten",
                        "short_name": "AA2"
                    },
                    "biotope_details": [],
                    "surface": 1000.0
                }
            ],
            "after_states": [
                {
                    "biotope": {
                        "id": 7674,
                        "long_name": "Fichtenwald",
                        "short_name": "AJ0"
                    },
                    "biotope_details": [
                        {
                            "id": 7674,
                            "long_name": "dystroph",
                            "short_name": "stc"
                        }
                    ],
                    "surface": 1000.0
                }
            ],
            "actions": [
                {
                    "action_types": [
                        {
                            "id": 7574357,
                            "long_name": "Sonstiges (s. Erläuterungen)",
                            "short_name": null
                        }
                    ],
                    "action_details": [
                        {
                            "id": 352524,
                            "long_name": "mit Freischneider (Kehrwalze)",
                            "short_name": "Freischneider"
                        },
                        {
                            "id": 6537634,
                            "long_name": "Wollschwein",
                            "short_name": "Wollschwein"
                        }
                    ],
                    "amount": 1000.0,
                    "unit": "qm",
                    "comment": ""
                }
            ],
            "deadlines": [
                {
                    "type": "finished",
                    "date": "2022-01-31",
                    "comment": ""
                }
            ]
        }
    }
}