Select
The $select system query option enables you to request the NFA OData service to return a specific property. The service returns a specified content with any expanded available navigation or stream properties. Also, it may return additional information.The value of the $select query option is a comma-separated list of properties, qualified action names, and qualified function names. You can also request all declared properties and dynamic structural properties using a star (*).When a $select query option is not specified, the service may return full set of properties or default set of properties.
nfa1000
The
$select
system query option enables you to request the NFA OData service to return a specific property. The service returns a specified content with any expanded available navigation or stream properties. Also, it may return additional information.
The value of the $select query option is a comma-separated list of properties, qualified action names, and qualified function names. You can also request all declared properties and dynamic structural properties using a star (*).
When a $select query option is not specified, the service may return full set of properties or default set of properties.
The default set of properties must include all key properties.
Resource URL
http://<nfa odata host>:<nfa odata port>/odata/api/<EntityType Name>?$select=<Property Name>
To display multiple properties for a given entity, separate each property name by a comma.
Method
GET
Parameters
The following table includes the mandatory parameter.
Sample Request
This sample request displays all the IfType and ID of Interface entity.
http:/127.0.0.1:8981/odata/api/interfaces?$select=IfType,ID
Sample Response
{ "@odata.context": "$metadata#interfaces(ID,IfType)", "value": [ { "ID": 1, "IfType": "WAN" }, { "ID": 2, "IfType": "WAN" }, { "ID": 3, "IfType": "WAN" }, { "ID": 4, "IfType": "WAN" }]}
Sample Request
This sample request displays all properties of Interface entity.
http://127.0.0.1:8981//odata/interfaces?$select=*
Sample Response
{ "@odata.context": "$metadata#interfaces(*)", "value": [ { "ID": 283, "AgentType": "Physical", "RouterAddress": "127.0.0.1", "Description": "", "InSpeed": 0, "OutSpeed": 0, "IfIndex": 1, "PersistentIfIndex": 1, "IfType": "WAN", "UpdatedOn": 1526877024, "Enabled": "N", "LastData": 1527153321, "HarvesterAddress": "127.0.0.1" }, { "ID": 284, "AgentType": "Physical", "RouterAddress": "127.0.0.11", "Description": "", "InSpeed": 0, "OutSpeed": 0, "IfIndex": 2, "PersistentIfIndex": 2, "IfType": "WAN", "UpdatedOn": 1526877024, "Enabled": "N", "LastData": 1527153321, "HarvesterAddress": "127.0.0.1" }, { "ID": 287, "AgentType": "Physical", "RouterAddress": "127.0.0.1", "Description": "", "InSpeed": 0, "OutSpeed": 0, "IfIndex": 3, "PersistentIfIndex": 5, "IfType": "WAN", "UpdatedOn": 1526877024, "Enabled": "N", "LastData": 1527153321, "HarvesterAddress": "127.0.0.1" }, { "ID": 291, "AgentType": "Physical", "RouterAddress": "127.0.0.1", "Description": "", "InSpeed": 0, "OutSpeed": 0, "IfIndex": 4, "PersistentIfIndex": 9, "IfType": "WAN", "UpdatedOn": 1526877024, "Enabled": "N", "LastData": 1527153321, "HarvesterAddress": "127.0.0.1" } ]}