I have built all my WEB Services in the past as SOAP XML
In VS 2019 What is the process for building a REST WebAPI?
RESTWeb ServicesXML
Last Comment
gr8gonzo
8/22/2022 - Mon
David Favor
Simple approach is to visit https://GitHub.com + pull off one of the many API projects, in whatever language you prefer.
Use this code as a starting point.
David Favor
API Design Note
After having to recode many a failing API Endpoint system, here's an important design consideration.
1) Any synchronous API must be fast.
By synchronous I mean the API is called, then returns data.
You best well ensure all data to be returned is living in RAM... else...
2) The primary reason APIs fail is the project succeeds + traffic destroys API throughput.
The API keeps getting called, then falls behind answering requests, then the client (callers) + server (API Endpoint) start crashing.
3) The solution for any API service you expect to succeed is only use asynchronous API return design patterns.
The most common is to register a Webhook with the API service, then make an API call that returns instantly with no data payload, then as the API Endpoint server has time, a Webhook is called to return the data payload.
If you use an asynchronous API return design pattern then your API Endpoint will survive any level of traffic.
gr8gonzo
You didn't add a topic zone for ASP.NET but you mentioned VS 2019 and SOAP, so I'm reading between the lines here and thinking you built a WCF-based SOAP service in .NET.
Just to avoid assumptions, are you looking to use the same language and framework but just do it as REST instead of SOAP?
Aside from anything language-specific, there are some general good practice principles. For example, while most of SOAP behavior is defined in the message body and the SOAPAction header, REST often makes more just of different, less-common HTTP verbs like PATCH and DELETE.
However, I'm not sure if you're looking for general advice or something more specific like how to get started...?
gr8gonzo, You are correct... I have a WCF Based Soap API where WE provide the endpoint for vendors to get insert sales and personnel data. It is C# code base but I ddon;t care which if its C# or VB
Simply looking to morph it into REST and need some general guidelines...
As in
Do I need to recode the whole thing?
There are about 30 WebMethods and 5000 lines of code.
Use this code as a starting point.