So I have reviewed the Rest WebAPI example application from Appeon located at
I am using PB 2022 for this and trying to build a simple WebAPI to do some very basic stuff.
My knowledge of WebAPI and C# already quite limited... the examples seem to be too basic and i need more help to see what the code COULD look like.
Does NOT have to be perfect, im not protecting national secrets here, its a basic PB app needing some webapi back and forth....
Goals were:
1. Build a basic WebAPI that can do some datastore retrieves using HttpPost/Get - Seems to work (from example provided)
2. Create some additional methods that could be called , some as endpoints (yeah nothing on that)
3. Create some methods as internal utility methods that should not be seen by anyone, i guess we call those 'business logic functions' ... These could be called by the public endpoints from #2. no?
4. Secure the WebAPI itself using JWT (hence why i picked the example, i assume example works?)
5. Needs to have some way to authenticate the users as they connect and use the endpoints to begin with...
Probably again more private methods that are like a basic user login/password authenticate them to a database table?
I guess maybe i'm confused with what is illustrated so far...
The example does seem to function at basic enough level but no example of where to place private functions so that private logic/business logic can be executed by the public functions without exposing those private methods as endpoints to the users of the webapi, again, yes i know my skill is a bit weak but was hoping for some more real world examples of something more 'illustrative' to help me out.
Can someone please point me in a better direction with a more robust working example(s) of some restapi developed preferably with SnapDevelop 2022 so that I can see how its supposed to be setup?
More examples of the best stuff we all waited so many years for would be greatly appreciated.
F.
Trying to teach this old dog new tricks is not fun sometimes....