If I send a query to the OData
service it is restricting a number of results to 25.
Eg:
The following
filter is having more than 25 results actually but the Odata is returning the
first 25 results alone. The same behaviour is showing for Components,
ComponentPresentations.
List<OEntity> customMetasSg1 = new ArrayList<OEntity>(100);
customMetasSg1 = consumer.getEntities("CustomMetas")
.filter(
"KeyName eq 'StructureGroupID'"
)
.execute().toList();
Output : customMetasSg1.size()25
Is there a way this setting can be overridden to get all the results based on query criteria?
Yes
Option 1: setting &top=XX
Option 2: setting DefaultTop in cd_webservice_conf.xml as described http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/cd_webservice_confN1001C#addHistory=true&filename=cd_webservice_confReference.ConfigNodeN1000D.xml&docid=cd_webservice_confN1000D&inner_id=&tid=&query=&scope=&resource=&eventType=lcContent.loadDoccd_webservice_confN1000D
List<OEntity> customMetasSg1 = new ArrayList<OEntity>(100);
customMetasSg1 = consumer.getEntities("CustomMetas")
.filter(
"KeyName eq 'StructureGroupID'"
)
.execute().toList();
Output : customMetasSg1.size()25
Is there a way this setting can be overridden to get all the results based on query criteria?
Yes
Option 1: setting &top=XX
Option 2: setting DefaultTop in cd_webservice_conf.xml as described http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/cd_webservice_confN1001C#addHistory=true&filename=cd_webservice_confReference.ConfigNodeN1000D.xml&docid=cd_webservice_confN1000D&inner_id=&tid=&query=&scope=&resource=&eventType=lcContent.loadDoccd_webservice_confN1000D
No comments:
Post a Comment