Showing posts with label CM Database. Show all posts
Showing posts with label CM Database. Show all posts

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

Friday 29 April 2016

WCF RestService over CoreService

WCF RestService over CoreService 

Introduction 

This service is created to get data from SDL Tridion CM Database ,currently this service is tested with SDL Tridion 2013 SP1


In this service you will see many methods are exposed and message format JSON and XML output.

Methods which are available
  1. GetComponentByTcmUri
  2. GetSchemaByTcmUri
  3. GetAllCategoriesWithInPubByTcmUri
  4. GetKeywordByCategoryID
  5. GetPageTempletByPubID
  6. GetComponentTemplateByPubID
  7. GetTemplateBuildingBlockByPubID
  8. GetPageByPubID
  9. GetStructureGroupByPubID
  10. GetMultimediaComponentByPubID
  11. GetPublicationList
  12. GetUserList 


Example
To request a categories from the Tridion CM Database.
http://domainname/RestService.svc/GetAllCategoriesWithInPubByTcmUri/{TCMURI}/{messageformat}
http://domainname/RestService.svc/GetAllCategoriesWithInPubByTcmUri/0-1048-1/JSON

You can download the code from here

Happy coding and keep sharing :)