Rest syntax for require only few fields from an entity list

Hi,
what's the Rest syntax in Xdata for fetch only some fields for a list?
Thanks in advance

Hi,

From the automatic entity CRUD end-points? There's no way, AFAIK. What you can do is to define entities with only the fields you're interested in. Ex. you may have a TProduct entity with all fields and a TProductBrief with only a few fields of interest.

HTH,

Hi Anderson,
for ex.: GET /tms/xdata/Customer?$filter=Country/Name eq 'USA'&$orderby=Name&$top=10

Other Rest tools have also $fields=xxx,yyy, or $select=xxx,yyy without create another entity.

Thanks

Hi Monterisi,

Other Rest tools have also $fields=xxx,yyy, or $select=xxx,yyy without create another entity.

Yes, I understand. Unfortunatly, AFAIK, this is not an option in XData currently. I guess you can implement something like that using service operations (although using different entities is easier, I think). Also, you may register a Feature Request for that (or vote for it if one already exists).

Regards,

1 Like