I sometimes see Tridion developers looking into the MS SQL or Oracle database if they want to check what is published. Most Tridion implementations use the CD web service and it is much easier and faster to look into this service. There are exceptions of course, if you want to inspect REL TCDL tags you still want to look into the database, the TCDL tags will get parsed by the Tridion stack when you retrieve content through the CD web service.
Here are a few simple steps to get started browsing though the OData endpoint of the CD web service.
1. Get the Content Delivery web service URL
You can find the URL of the CD web service in the Session Preview settings of the publication targets.2. Browse the Content Delivery web service
Use Chrome. Firefox and IE try to parse the feed generated by the CD web service and do not show the Atom XML.Browse to the URL, you will see this listing. Do not forget the tailing / in the URL or you will get the service’s WCF info page instead of the feed. In this example the base URL is http://stg2013sp1demo.ams.dev:84/odata.svc/
This page shows lists all entities available in the Content Delivery web service, ranging from BinaryVariants to Schemas.
3. Digg in into collections
Explore the collections of entities, for example the dynamic component presentations: http://stg2013sp1demo.ams.dev:84/odata.svc/ComponentPresentationsEach component presentation is vieved in a
4. Select an entity by id
Grab one specific entity, for example to check
it is published correctly:
http://stg2013sp1demo.ams.dev:84/odata.svc/ComponentPresentations(PublicationId=6,ComponentId=111,TemplateId=123)
5. Get related entities
The feed is self-explanatory, the nodes show the URLs to dig in deeper into the feed. In the previous example you see the link elements which link to related entities and entity collections.- Entity URL
ComponentPresentations(PublicationId=6,ComponentId=111,TemplateId=123) - Component entity for this component presentation
ComponentPresentations(PublicationId=6,ComponentId=111,TemplateId=123)/Component - Component template for this component presentaiton
ComponentPresentations(PublicationId=6,ComponentId=111,TemplateId=123)/Template - Pages where this component presentation is used
ComponentPresentations(PublicationId=6,ComponentId=111,TemplateId=123)/Pages
6. Expand
Entities can be expanded to show more information in one go, for example you can show the full component entity in the component presentation entity.For example get a component presentation and the linked component:
http://localhost:84/odata.svc/ComponentPresentations(PublicationId=6,ComponentId=111,TemplateId=123)?$expand=Component
Note the < m:inline > element which contains the component entity.
7. Get a field
The OData protocol used for the CD web service also allows to select specific field or field value of an entity. For example the title of the component in the previous example.http://localhost:84/odata.svc/Components(ItemId=111,PublicationId=6)/title/$value
or
http://localhost:84/odata.svc/ComponentPresentations(PublicationId=6,ComponentId=111,TemplateId=123)/Component/title/$value