From 43d45a9c99d700a2e0d167e031313ed08504a88a Mon Sep 17 00:00:00 2001 From: Michel Peltriaux Date: Fri, 28 Jan 2022 13:42:00 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eapi=5Fde=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api_de.md | 333 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 332 insertions(+), 1 deletion(-) diff --git a/api_de.md b/api_de.md index 0f8182e..3fed5d2 100644 --- a/api_de.md +++ b/api_de.md @@ -1,5 +1,5 @@ # API -## Erste Schritte und Grundlagen +## Vorbereitung 1. Nutzer muss mindestens der Nutzergruppe `Standard` angehören 1. Eigene/Freigegebene Daten können eingesehen werden (`GET`) 2. Neue Daten können angelegt (`POST`) und bestehende bearbeitet werden (`PUT`) @@ -9,3 +9,334 @@ 1. Nutzer muss sich einen API Token im KSP-Profil generieren 1. Generierte Token müssen erst von Administratoren bestätigt werden. Vorher sind sie nicht gültig und können nicht verwendet werden. Administratoren werden automatisch nach Generierung eines neuen Token per Mail informiert. 1. Token können von Administratoren zeitlich begrenzt werden. Ist das Datum der Gültigkeit abgelaufen, können die Token nicht länger verwendet werden + 1. Token werden in jedem Request Header als `Ksptoken` angegeben + +## Spezifikation +### Eingriff +#### GET alle +`/api/v1/intervention` + +**Beispiel Response:** +
+ Aufklappen + +```json +{ + "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": { + "atom_id": 1764986, + "long_name": "Stadt Koblenz", + "short_name": null + }, + "registration_file_number": "123", + "conservation_office": { + "atom_id": 710138, + "long_name": "ST Koblenz", + "short_name": "25" + }, + "conservation_file_number": "5664", + "handler": "Stadt Koblenz" + }, + "legal": { + "registration_date": "2021-12-27", + "binding_date": "2022-01-21", + "process_type": { + "atom_id": 626841266, + "long_name": "Bebauungsplan", + "short_name": null + }, + "laws": [ + { + "atom_id": 710067, + "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": { + "atom_id": 1764986, + "long_name": "Stadt Koblenz", + "short_name": null + }, + "registration_file_number": "123", + "conservation_office": { + "atom_id": 710138, + "long_name": "ST Koblenz", + "short_name": "25" + }, + "conservation_file_number": "5664", + "handler": "Stadt Koblenz" + }, + "legal": { + "registration_date": "2021-12-27", + "binding_date": "2022-01-21", + "process_type": { + "atom_id": 626841266, + "long_name": "Bebauungsplan", + "short_name": null + }, + "laws": [ + { + "atom_id": 710067, + "long_name": "Bauordnung von Rheinland-Pfalz", + "short_name": "LBauO" + } + ] + }, + "compensations": [], + "payments": [], + "deductions": [] + } + }, + ... +} + +``` + +
+ + +#### GET einzeln +`/api/v1/intervention/` + +**Beispiel Response:** +
+ Aufklappen + +```json +{ + "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": { + "atom_id": 1764986, + "long_name": "Stadt Koblenz", + "short_name": null + }, + "registration_file_number": "123", + "conservation_office": { + "atom_id": 710138, + "long_name": "ST Koblenz", + "short_name": "25" + }, + "conservation_file_number": "5664", + "handler": "Stadt Koblenz ODERSO" + }, + "legal": { + "registration_date": "2022-01-11", + "binding_date": "2022-01-28", + "process_type": { + "atom_id": 798693007, + "long_name": "Abstimmung", + "short_name": null + }, + "laws": [ + { + "atom_id": 710067, + "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" + } + } + ] + } + } +} +``` +
+ + + +
+ Click to expand +
\ No newline at end of file