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
- GetComponentByTcmUri
- http://127.0.0.1:8080/Coreservice/getComponentByTcm/{tcmuri}
- GetSchemaByTcmUri
- http://127.0.0.1:8080/Coreservice/getSchemaByTcm/{tcmuri}
- GetAllCategoriesWithInPubByTcmUri
- http://127.0.0.1:8080/Coreservice/GetAllCategoriesWithInPubByTcmUri/{tcmuri}
- GetKeywordByCategoryID
- http://127.0.0.1:8080/Coreservice/GetKeywordByCategory/{tcmuri}
- GetPageTempletByPubID
- http://127.0.0.1:8080/Coreservice/GetPageTempletByPubID/{tcmuri}
- GetComponentTemplateByPubID
- http://127.0.0.1:8080/Coreservice/GetComponentTemplateByPubID/{tcmuri}
- GetTemplateBuildingBlockByPubID
- http://127.0.0.1:8080/Coreservice/GetTemplateBuildingBlockByPubID/{tcmuri}
- GetPageByPubID
- http://127.0.0.1:8080/Coreservice/GetPageByPubID/{tcmuri}
- GetStructureGroupByPubID
- http://127.0.0.1:8080/Coreservice/GetStructureGroupByPubID/{tcmuri}
- GetMultimediaComponentByPubID
- http://127.0.0.1:8080/Coreservice/GetMultimediaComponentByPubID/{tcmuri}
- GetPublicationList
- http://127.0.0.1:8080/Coreservice/GetPublicationList
- 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