Monday 13 March 2017

Mircoservice over SDL WEB 8 Coreservice


Self Hosted REST Microservice using OWIN and ASP.NET Web API 2

Open Web Interface for .NET (OWIN) defines an abstraction between .NET web servers and web applications. OWIN decouples the web application from the server, which makes OWIN ideal for self-hosting a web application in your own process, outside of IIS.

ASP.NET Web API - CORS Support in ASP.NET Web API 2. Cross-origin resource sharing (CORS) is a World Wide Web Consortium (W3C) specification (commonly considered part of HTML5) that lets JavaScript overcome the same-origin policy security restriction imposed by browsers.

For more details on how to setup and create Microservice read it here.

This service is used to get the data from SDL WEB 8 CM Database

Methods which are available 
  1. GetComponentByTcmUri
    • http://127.0.0.1:8080/Coreservice/getComponentByTcm/{tcmuri}
  2. GetSchemaByTcmUri
    • http://127.0.0.1:8080/Coreservice/getSchemaByTcm/{tcmuri}
  3. GetAllCategoriesWithInPubByTcmUri
    • http://127.0.0.1:8080/Coreservice/GetAllCategoriesWithInPubByTcmUri/{tcmuri}
  4. GetKeywordByCategoryID
    • http://127.0.0.1:8080/Coreservice/GetKeywordByCategory/{tcmuri}
  5. GetPageTempletByPubID
    • http://127.0.0.1:8080/Coreservice/GetPageTempletByPubID/{tcmuri}
  6. GetComponentTemplateByPubID
    • http://127.0.0.1:8080/Coreservice/GetComponentTemplateByPubID/{tcmuri}
  7. GetTemplateBuildingBlockByPubID
    • http://127.0.0.1:8080/Coreservice/GetTemplateBuildingBlockByPubID/{tcmuri}
  8. GetPageByPubID
    • http://127.0.0.1:8080/Coreservice/GetPageByPubID/{tcmuri}
  9. GetStructureGroupByPubID
    • http://127.0.0.1:8080/Coreservice/GetStructureGroupByPubID/{tcmuri}
  10. GetMultimediaComponentByPubID
    • http://127.0.0.1:8080/Coreservice/GetMultimediaComponentByPubID/{tcmuri}
  11. GetPublicationList
    • http://127.0.0.1:8080/Coreservice/GetPublicationList
  12. GetUserList 
    • http://127.0.0.1:8080/Coreservice/GetUserList
You can download code from here.

Happy Codeing and keep Sharing !!!1

No comments:

Post a Comment