5 api v1 intervention get_de
mpeltriaux edited this page 2023-02-23 10:52:42 +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

Eingriff

GET alle

/api/v1/intervention

Beispiel Response
{
    "bd7673cb-aac1-42ba-9521-4e8143a82bb3": {
        "type": "MultiPolygon",
        "coordinates": [
            [
                [
                    [
                        7.593955993652341,
                        50.36244809879689
                    ],
                    [
                        7.592582702636717,
                        50.36023051515941
                    ],
                    [
                        7.601766586303708,
                        50.35823186336356
                    ],
                    [
                        7.603225708007811,
                        50.3628587510637
                    ],
                    [
                        7.599148750305174,
                        50.362557606415464
                    ],
                    [
                        7.596273422241207,
                        50.362612360130036
                    ],
                    [
                        7.593955993652341,
                        50.36244809879689
                    ]
                ]
            ]
        ],
        "properties": {
            "id": "bd7673cb-aac1-42ba-9521-4e8143a82bb3",
            "identifier": "EIV-012022-B9E08J",
            "title": "Tolles Baugebiet",
            "created_on": "2022-01-24T15:18:00.258Z",
            "modified_on": "2022-01-27T14:18:43.221Z",
            "responsible": {
                "registration_office": {
                    "id": 123,
                    "long_name": "Stadt Koblenz",
                    "short_name": null
                },
                "registration_file_number": "123",
                "conservation_office": {
                    "id": 321,
                    "long_name": "ST Koblenz",
                    "short_name": "25"
                },
                "conservation_file_number": "5664",
                "handler": {
                    "type": {
                        "id": 567,
                        "long_name": "Sonstige und private Träger",
                        "short_name": "Sonstige und private Träger"
                    },
                    "detail": "Firma Mustermann234"
                }
            },
            "legal": {
                "registration_date": "2021-12-27",
                "binding_date": "2022-01-21",
                "process_type": {
                    "id": 546,
                    "long_name": "Bebauungsplan",
                    "short_name": null
                },
                "laws": [
                    {
                        "id": 684,
                        "long_name": "Bauordnung von Rheinland-Pfalz",
                        "short_name": "LBauO"
                    }
                ]
            },
            "compensations": [],
            "payments": [
                {
                    "amount": 1.0,
                    "due_on": "2022-01-04",
                    "comment": ""
                }
            ],
            "deductions": []
        }
    },
    "e4e5197f-fe6c-49f6-93d0-8034d0592c1f": {
        "type": "MultiPolygon",
        "coordinates": [
            [
                [
                    [
                        7.593955993652341,
                        50.36244809879689
                    ],
                    [
                        7.592582702636717,
                        50.36023051515941
                    ],
                    [
                        7.601766586303708,
                        50.35823186336356
                    ],
                    [
                        7.603225708007811,
                        50.3628587510637
                    ],
                    [
                        7.599148750305174,
                        50.362557606415464
                    ],
                    [
                        7.596273422241207,
                        50.362612360130036
                    ],
                    [
                        7.593955993652341,
                        50.36244809879689
                    ]
                ]
            ]
        ],
        "properties": {
            "id": "e4e5197f-fe6c-49f6-93d0-8034d0592c1f",
            "identifier": "EIV-012022-GPFPQF",
            "title": "Tolles Baugebiet",
            "created_on": "2022-01-24T16:04:34.891Z",
            "modified_on": "2022-01-24T16:04:34.891Z",
            "responsible": {
                "registration_office": {
                    "id": 568,
                    "long_name": "Stadt Koblenz",
                    "short_name": null
                },
                "registration_file_number": "123",
                "conservation_office": {
                    "id": 888,
                    "long_name": "ST Koblenz",
                    "short_name": "25"
                },
                "conservation_file_number": "5664",
                "handler": {
                    "type": {
                        "id": 789,
                        "long_name": "Sonstige und private Träger",
                        "short_name": "Sonstige und private Träger"
                    },
                    "detail": "Firma Mustermann234"
                }
            },
            "legal": {
                "registration_date": "2021-12-27",
                "binding_date": "2022-01-21",
                "process_type": {
                    "id": 4576,
                    "long_name": "Bebauungsplan",
                    "short_name": null
                },
                "laws": [
                    {
                        "id": 643,
                        "long_name": "Bauordnung von Rheinland-Pfalz",
                        "short_name": "LBauO"
                    }
                ]
            },
            "compensations": [],
            "payments": [],
            "deductions": []
        }
    },
    ...
}
    

GET einzeln

/api/v1/intervention/<uuid>

Beispiel Response
{
    "97d7cce8-83e9-4043-bc76-317caf983a41": {
        "type": "MultiPolygon",
        "coordinates": [
            [
                [
                    [
                        7.593955993652341,
                        50.36244809879689
                    ],
                    [
                        7.592582702636717,
                        50.36023051515941
                    ],
                    [
                        7.601766586303708,
                        50.35823186336356
                    ],
                    [
                        7.603225708007811,
                        50.3628587510637
                    ],
                    [
                        7.599148750305174,
                        50.362557606415464
                    ],
                    [
                        7.596273422241207,
                        50.362612360130036
                    ],
                    [
                        7.593955993652341,
                        50.36244809879689
                    ]
                ]
            ]
        ],
        "properties": {
            "id": "97d7cce8-83e9-4043-bc76-317caf983a41",
            "identifier": "EIV-12022-B6XGM9",
            "title": "Tolles Baugebiet GEÄNDERT1",
            "created_on": "2022-01-12T11:37:31.580Z",
            "modified_on": "2022-01-27T10:36:40.324Z",
            "responsible": {
                "registration_office": {
                    "id": 897,
                    "long_name": "Stadt Koblenz",
                    "short_name": null
                },
                "registration_file_number": "123",
                "conservation_office": {
                    "id": 245,
                    "long_name": "ST Koblenz",
                    "short_name": "25"
                },
                "conservation_file_number": "5664",
                "handler": {
                    "type": {
                        "id": 4673,
                        "long_name": "Sonstige und private Träger",
                        "short_name": "Sonstige und private Träger"
                    },
                    "detail": "Firma Mustermann234"
                }
            },
            "legal": {
                "registration_date": "2022-01-11",
                "binding_date": "2022-01-28",
                "process_type": {
                    "id": 4467,
                    "long_name": "Abstimmung",
                    "short_name": null
                },
                "laws": [
                    {
                        "id": 5467,
                        "long_name": "Bauordnung von Rheinland-Pfalz",
                        "short_name": "LBauO"
                    }
                ]
            },
            "compensations": [
                {
                    "id": "71a0d04e-8d6a-4d95-845a-6889d920b5f6",
                    "identifier": "KOM-012022-2OOT0W",
                    "title": "Tolle Kompensation"
                },
                {
                    "id": "7303afbb-693c-4623-adb0-8ab115d6bacc",
                    "identifier": "KOM-012022-EG28XU",
                    "title": "Tolle Kompensation"
                },
                {
                    "id": "d0ef1ef2-0bfd-4162-b8ac-15a560a2346f",
                    "identifier": "KOM-012022-13A8HK",
                    "title": "Tolle Kompensation"
                },
                {
                    "id": "a57ed186-7a64-4b25-bbae-185fb96a132d",
                    "identifier": "KOM-012022-NN28UL",
                    "title": "Tolle Kompensation"
                },
                {
                    "id": "128d387d-9ef5-499c-a33f-9aa0ff4ea731",
                    "identifier": "KOM-012022-UL356G",
                    "title": "Tolle Kompensation1234"
                },
                {
                    "id": "d68e9874-70c0-41c5-bd05-9dda97d70ac0",
                    "identifier": "KOM-12022-W3VTY1",
                    "title": "Tolle Kompensation"
                }
            ],
            "payments": [
                {
                    "amount": 100.0,
                    "due_on": "2022-01-12",
                    "comment": ""
                }
            ],
            "deductions": [
                {
                    "id": "f784e131-afb7-4e15-ad57-0b2469f5e967",
                    "eco_account": {
                        "id": "3e7acd84-bb67-408d-886e-91004c319f38",
                        "identifier": "OEK-12022-TW4ECJ",
                        "title": "Tolles Ökokonto"
                    },
                    "surface": 1000.0,
                    "intervention": {
                        "id": "97d7cce8-83e9-4043-bc76-317caf983a41",
                        "identifier": "EIV-12022-B6XGM9",
                        "title": "Tolles Baugebiet GEÄNDERT1"
                    }
                }
            ]
        }
    }
}