3

Looking at OData documents I want to be able to use the query option $select=... like this http://services.odata.org/OData/OData.svc/Products?$select=Name,Category. However, $select is only for OData V2 and above. After checking the Tridion version being sent back across the network it says it is v1.

My question is can you update Tridion's OData service?

My end goal is to select a specific field in JSON format for example: http://<*domain:port*>/cd_webservice/odata.svc/Components(ItemId=12345,PublicationId=123)/ComponentPresentations?$select=PresentationContent&$format=json

EDIT:

To answer the questions:

  1. I am using SDL 2013 SP1
  2. OData been updated serveral times. Just Like HTML has gone from 2.0 to 3.0 to 4.0 to 4.01 to 5.0, OData has gone from 1.0 to 2.0 to 3.0 to now 4.0. My question is, is there an update for Tridion OData service so I can get it to 2.0 to utilize the new features in that version.
    1. I want just the PresentationContent of the component by using the $select Query operator of the OData Service
  • Hi Robert. Welcome to tridion.stackexchange. I've made some minor edits in your question, but I still don't understand exactly what you want to know... What do you mean by 'updated'? Do you want a later version of OData? Which version of Tridion are you using? Perhaps you could update the question to make this clear. Then I'm pretty sure you'll get good answers. – Dominic Cronin Jun 10 '16 at 6:58
  • SDL Web 8 is using a mix of OData v4 and v2 for the REST services. – Nuno Linhares Jun 13 '16 at 12:26
3

Given it seems that the question is

Can we plugin a new or updated query model for the web content services?

the short answer is no. As per the documentation - the ODATA implementation is

a partial implementation of the OData protocol

so it doesn't actually provide for the full flavour of ODATA in the existing version even. I think Nick encapsulates it well in his blog post

{OData} is simply the Broker API exposed as a web service – at least the most popular functionality of the original Broker API

With regards to what it is you're trying to get exactly Robert (e.g. specific to custom metadata etc.) perhaps this post is useful with some examples of the limitation and possible approach around.

As Hiren notes - there is an method to 'extend' the current functionality - perhaps this could be extended to provide more efficient references for frequently used queries within your environment? - note that it's not stated to work in Web8 so if this is one your roadmap you should consider reviewing this as part of the upgrade requirements.

2

Yes, there is a way to extend the Odata.

Please check the referenced article: Odata Extension

Please note, extension is possible to odata however after every upgrade you might have to revisit this extension so that it continues to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.