Azure function that communicates with RiM 2 WebService
Pulls data from RiM 2 WebService every 1 minute, stores documents(s) in blob storage as JSON.
{
"UnikId": "1",
"FagsystemNavn": "VIGO",
"Fodselsnummer": "01234567890",
"Fornavn": "Morkel",
"Etternavn": "Mosetuss",
"Epost": "morkel_musetuss@hotmail.com",
"Mobilnr": "91000000",
"Skole": "",
"Fylke": "8",
"FolkeRegisterAdresse": {
"Adresselinje1": "Morgentåkedalen 1000",
"Adresselinje2": "",
"Postnummmer": "3000",
"Poststed": "NOTODDEN"
},
"Dokumentelement": {
"Dokumenttype": "SOKNAD",
"Dokumenttittel": "Søknad",
"DokumentId": "ADADAXBXZVAE",
"Dokumentdato": "2019-01-29T23:00:00.000Z",
"Dokumentfil": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9MZW5ndGggMjc2L04gMy9GaWx0ZXIvRmxhd ...", // Base64 of PDF
"Tilhorighet": "8",
"Info": "20192020;8026;Nome videregående skole;BAANL2----;Anleggsteknikk;"
}
}
HttpTrigger needs body example
{
antallElevDokument: 10
}
HttpTrigger needs body example
{
status: {
fagsystemNavn: 'Public360',
dokumentId: 'ADADAXBXZVAE',
fodselsnummer: '01234567890',
arkiveringsUtfort: true
}
}
{
"Values": {
"VGO_URL": "https://vigo.dummy.allthethings.win",
"VGO_USERNAME": "username",
"VGO_PASSWORD": "password",
"VGO_FYLKE": "8",
"VGO_ANTALL_ELEV_DOKUMENT": "1"
}
}
You'll need a valid subscription and to setup the following resources
- resource group
- app service plan
- storage account
The easiest way to make this function run is to setup an app service, configure the app and get the function from GitHub.
- add function app
- Runtime stack -> Node
Configuration for app (Application settings)
-
add values from local.settings.json
-
add function
- Plattform features -> deployment center
- github
- branch master
Install all tools needed for local development.
Clone the repo. Install dependencies (npm install
)
Create a local.settings.json file
Install extentions
$ func extentions install
Start server
$ func start