C# Web API Mockup in .NET 4.x with some security features and example end points and examples on how to add global connections, etc.

Job ID: 33838459

Budget: $30 – $250 AUD

Hi there,
I hope you're well!
I’m trying to learn about commercial-grade Web APIs, so I would like a skeleton Web API, written in C# to be developed in .NET 4x (MUST be .NET 4.x because I have some legacy framework libraries that I need to use this with). I’d like the Web API to be delivered with a few mock endpoints so that I can see how the different functions are implemented. If there is any additional configuration required for one of the functions, I’d like to have a brief explanation added in the code comment on how and what to configure.
I'd like a brief explanation (again in the code comments is fine) on how to implement new endpoints with routing, aync/async, etc.

Below is essentially a list of all the things I’d like delivered:
• A skeleton Web API that is written in C# .NET 4.x - Please make sure to only include references and code files that are required (the less bloat the better)
o With an example endpoint for each of the auth types below:
 Client ID/secret method
 API key method
 Username/password
 OAuth (any provider) - optional
 Any other you might think would be helpful

o Also with an example endpoint for each of the below:
 How to use a global database connection with some sort of connection pooling and returning a simple string. (I would like to understand how to set up a connection to a database and maintain the connection for all inbound API calls/the life of the application) – I don’t need it to actually connect to a database, I just want to understand how and where to configure these types of global connections for use throughout the Web API.
 An endpoint that sends a request to another remote endpoint and then returns the results (again, doesn’t need to actually connect and do anything, I just need it so I can see how it would be done) with basic error handling, etc,

I also currently use a .NET framework class library that allows me to connect to a legacy application. This connection can only be made once, and then must be maintained for a certain amount of time (configurable) and once that time has passed, the connection must be closed and then re-established on the next inbound request. Can you also show a mock-up of how/where I would possibly set that up in the Web API including the ability to configure the amount of time (in minutes) that the application should maintain the connection for. I just need some classes and method examples of where I can do that, and how I can instruct the Web API application to perform connecting/disconnecting after x minutes, etc.

Thanks very much for your time, I look forward to hearing from you.
Sincerely,
Paul
Related categories: .NET C# Programming Web API