API Questions on Kentico API.
Version 6.x > API > RESTful service with multiple columns only returning first column View modes: 
User avatar
Member
Member
jheavner-ce - 3/23/2012 10:43:20 PM
   
RESTful service with multiple columns only returning first column
I am issuing a rest call like...
~/rest/content/site/CorporateSite/en-us/all/Events-Awards/?classnames=cea.Event&columns=EventName,EventStartTime,EventID

However the result set that is returned only has the first column "EventName".

If I change the call to...

~/rest/content/site/CorporateSite/en-us/all/Events-Awards/?classnames=cea.Event&columns=EventStartTime,EventID,EventName

Then the only value in the result set is EventStartTime.

I've looked at what SQL profiler is getting and it looks like the call is being processed correctly. Here's the call as it comes through the Profiler. All the columns are there.

SELECT EventName, EventStartTime, EventID, ClassName, NodeACLID, NodeSiteID, NodeOwner, DocumentCulture, SiteName FROM View_cea_Event_Joined WHERE (((((NodeSiteID = 1) AND (Published = 1)) AND (DocumentCulture = N'en-us')) AND (NodeAliasPath LIKE N'/Events-Awards/%'))).

I've also tried using " %2c" instead of the comma. Again, SQL processes it correctly but only the first column is returned.

I even tried using the patter &columns=EventName&columns=EventStartTime. Once again, it appears that it's being processed correctly by what I can see in SQL Profiler but again, only the first column in the list is being returned.

Am I doing something wrong?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/24/2012 9:33:37 AM
   
RE:RESTful service with multiple columns only returning first column
Hi,

I tried to reproduce the issue on hf 6.0.21 and all columns listed were displayed correctly. Could you please apply the latest hotfix and try following query?

~/rest/content/site/CorporateSite/en-us/all/news?columns=NodeID,NodeName,NewsTitle&classnames=cms.news

It works with a default Corporate site.

Best regards,
Ivana Tomanickova