In the last blog we went over powerful HTTP language support for NITRO (/blogs/2011/08/05/nitro-apis-fun-over-http/). Let us now understand how dynamic the behavior and response could be given the HTTP query support. HTTP protocol has extensive query language and with NITRO we utilize the query part for powerful operations on NetScaler resources. The query language enables us to do operations and filtering in most simplified manner which would otherwise require a lengthy program or script to do same. Filtering has excellent use cases whenever we talk about large configuration on NetScaler as it reduces the data transfer, saves bandwidth and results in better response time overall. Similarly other query parameters have their own significance and results in dynamic output based on use cases.
Following are examples of what we can do with the query support.
- Finding out total number of LB vservers
- Summary view of LB vservers
- LB vservers with servicetype/protocol as SSL
- LB vservers configured on port 80
- LB vservers currently in DOWN state
- LB vservers configured with Persistence type as SOURCEIP
- LB vservers configured with LB method as Least Connection
- Rewrite policies with rule as TRUE
- Rewrite policies which have hit UNDEF any time
- Rewrite policies which are not in-built or system generated
- System command policies with action as ALLOW
- Display only 1 LB vserver per page
- For large configuration fetch 2nd page with 10 records
- SNMP OIDs for service as entity type
- All LB vserver with format as XML
Overall the query support with NITRO makes it much more simpler and convenient to use as compared to writing similar logic in a scripting or programming language.