The Networking API v2.0 supports filtering based on all top level attributes of a resource. Filters are applicable to all list requests.
For example, the following request returns all
networks named foobar
:
GET /v2.0/networks?name=foobar
When you specify multiple filters, the Networking API v2.0 returns only objects that meet all filtering criteria. The operation applies an AND condition among the filters.
![]() | Note |
---|---|
OpenStack Networking does not offer an OR mechanism for filters. |
Alternatively, you can issue a distinct request for each filter and build a response set from the received responses on the client-side.
By default, OpenStack Networking returns all
attributes for any show or list call. The Networking API v2.0 has
a mechanism to limit the set of attributes returned.
For example, return id
.
You can use the fields
query
parameter to control the attributes returned from the
Networking API v2.0.
For example, the following request returns only
id
and name
for each network:
GET /v2.0/networks.json?fields=id&fields=name