In this step we want to get a first WebApi Controller to work.

We'll start with the Insights Controller since it's fairly simple and doesn't any UIs. 

  1. Define the path where APIs will be published. In general we need some kind of root path, after which all 2sxc endpoints are added. Common roots are /api/sxc/, [some-root]/api/sxc/ or similar.
  2. Determine where you'll store all your web-api files. In the end there will be about 30 in various folders, so let's assume you'll call it Controllers.
  3. In your location create a Sys folder. 
  4. Create a Web-API Controller in the technology that you're using - usually called InsightsController.  Define the route
  5. Now create a simple Ping-action just to see it work. If all worked, you should be calling something like /api/sys/insights/ping and getting a result. 
  6. Now continue to creating the entire insights controller. If you have a proper DI-system which initializes the controllers, use the examples from ToSic.Sxc.Oqt. If you don't, use the DNN examples. 

If you have the insights, can start with /api/sxc/insights/help and navigate around in the memory, then you have your first controller working!