-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Inleiding\n", | ||
"---------\n", | ||
"Om data aan te leveren wordt het uploadtask endpoint gebruikt. Met behulp van een POST request kan een type levering worden geselecteerd, en de data daarvoor aangeleverd worden. Deze data dient in json formaat aangeleverd te worden. De API zet de data om in een XML formaat en levert de data aan. De status van dit proces kan bijgehouden worden in de upload task instance die wordt aangemaakt na een POST request.\n", | ||
"\n", | ||
"Hieronver een voorbeeld van hoe vanuit een script een POST request kan gemaakt worden voor een GMN StartRegistration:\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import requests\n", | ||
"\n", | ||
"url = \"http://brostar.nl/api/uploadtasks/\"\n", | ||
"\n", | ||
"metadata = {\n", | ||
" \"requestReference\":\"test\",\n", | ||
" \"deliveryAccountableParty\":\"12345678\",\n", | ||
" \"qualityRegime\":\"IMBRO\"\n", | ||
" }\n", | ||
"\n", | ||
"sourcedocument_data = {\n", | ||
" \"objectIdAccountableParty\":\"test\",\n", | ||
" \"name\":\"test\",\n", | ||
" \"deliveryContext\":\"kaderrichtlijnWater\",\n", | ||
" \"monitoringPurpose\":\"strategischBeheerKwaliteitRegionaal\",\n", | ||
" \"groundwaterAspect\":\"kwantiteit\",\n", | ||
" \"startDateMonitoring\":\"2024-01-01\",\n", | ||
" \"measuringPoints\":[\n", | ||
" {\n", | ||
" \"measuringPointCode\":\"PUT00001\",\n", | ||
" \"broId\":\"GMW000000000001\",\n", | ||
" \"tubeNumber\":\"1\"\n", | ||
" }\n", | ||
" ]\n", | ||
"}\n", | ||
"\n", | ||
"payload = {\n", | ||
" \"bro_domain\": \"GMN\",\n", | ||
" \"project_number\": \"1234\",\n", | ||
" \"registration_type\": \"GMN_StartRegistration\",\n", | ||
" \"request_type\": \"registration\",\n", | ||
" \"metadata\": metadata,\n", | ||
" \"sourcedocument_data\": sourcedocument_data\n", | ||
"}\n", | ||
"\n", | ||
"r = requests.post(url, json=payload)\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Mogelijke berichten\n", | ||
"--------------------\n", | ||
"\n", | ||
"**GMW**\n", | ||
"- registration\n", | ||
"\n", | ||
"**GMN_StartRegistration**\n", | ||
"- registration\n", | ||
"- move\n", | ||
"- replace\n", | ||
" \n", | ||
"**GMN_MeasuringPoint**\n", | ||
"- registration\n", | ||
"- move\n", | ||
"- replace\n", | ||
"- insert\n", | ||
"- delete\n", | ||
"\n", | ||
"**GMN_MeasuringPointEndDate**\n", | ||
"- registration\n", | ||
"- move\n", | ||
"- delete\n", | ||
"\n", | ||
"**GMN_TubeReference**\n", | ||
"- registration\n", | ||
"- insert\n", | ||
"- move\n", | ||
"- replace\n", | ||
"- delete\n", | ||
"\n", | ||
"**GMN_Closure**\n", | ||
"- registration\n", | ||
"- move\n", | ||
"- delete" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Input per berichttype\n", | ||
"---------------------\n", | ||
"\n", | ||
"**GMW**\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"name": "python" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |