Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jondjones/104b7213fd17816f00254228b6cea7b8 to your computer and use it in GitHub Desktop.
Save jondjones/104b7213fd17816f00254228b6cea7b8 to your computer and use it in GitHub Desktop.
How To Create a JSON API Within Umbraco 8 - 2
public class MyApiController : UmbracoApiController
{
[HttpGet]
public JsonResult<List<SomeData>> GetJson()
{
var json = new List<PostInfo>();
// call umbraco, get data, do whatever
return Json(json);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment