- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Combining search GET
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-13-2017 03:38 AM
We are questioning our infobox for special extensible attributes. Is there a way of combining searches for network as well as network_containers. I tried this one but doesn't work:
curl -k1 -u userassword -X GET https://grid/wapi/v2.1/networkcontainer -d _return_fields%2B=extattrs -d *Kunde~:=name&network -d _return_fields%2B=extattrs -d *Kunde~:=_*
Goal is to get one output by questioning network as well as network containers in parralel.
Thanks in advance!
Re: Combining search GET
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-13-2017 11:47 AM
You can't search across multiple objects, but you can bundle multiple searches into a single call using the '/request' path.
e.g this will search networks and containers and return you 2 arrays with the results
(you get one array per request object)
POST /wapi/v2.3/request HTTP/1.1 Host: xxx Authorization: Basic --- Content-Type: application/json [ { "method": "GET", "object": "network", "data": { "network": "10.0.0.0/24" } }, { "method": "GET", "object": "networkcontainer", "data": { "network": "10.0.0.0/8" } }]
Re: Combining search GET
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-18-2017 03:39 AM
Thanks for your reply! Can the /request path be used within one curl call and how could this look like (syntax)? I did not find specific information therefore. If this is not working with curl how would a alternative way look like?
THANKS!