Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Odata query on specific table columns

I'm trying to getting column-specific results while querying an odata service like shown below:

http://services.odata.org/V4/OData/OData.svc/Suppliers?$filter=ID%20eq%201

The result contains values for the columns ID, Name, Adress, Location and Concurrency. How can I adjust the url-filter so the response contains only values for the columns ID and name, while the ID must be '1'?

Thanks in advance.

like image 843
Elendas Avatar asked Mar 25 '26 01:03

Elendas


1 Answers

Already found the answer, I should be using a $select parameter in the url like this:

http://services.odata.org/V4/OData/OData.svc/Suppliers?$select=Name, ID, &$filter=ID eq 1
like image 162
Elendas Avatar answered Mar 27 '26 20:03

Elendas