To create a api there are alot opporunities. Right now I prefer SOAP-APIs in Visual Studio because it is easy as possible to create such one.
I will do this with Visual Studio 2017 and a console-application, so nothing special:
For the example I googled for free SOAP-Webservice and got this one here that can handle some information about the BLZ:
To start in Visual Studio I add a reference like this:
- Rightclick in the solution explorer at references.
- Click “Add Service Reference”
- Click “Advanced…”
- Click “Add Web Reference…”
- Paste the URL and click on the arrow.
- Type in a name that specifies the webservice-name in your project.
- Click “Add Reference”.
pre>This will add a folder to your projects called “Web References” and will add the service. Like this you will also get every object and method that you need. So I am able to write this code:
var BLZService = new OpenSOAPBLZService.BLZService(); var Bank = BLZService.getBank("10070100"); Console.WriteLine(Bank.bezeichnung + " - " + Bank.ort); Console.ReadLine();
Here we create a new object based on the service that we created, create a new bank object (which class is also created by the Add-Reference-Function) and show the bank description and the location of the bank in the console. So we get this out here: