This page contains frequently asked questions (FAQs) about the API for Lens, a campus network information system.
IE requires that you include a content-type request parameter. Supported types are text/x-yaml, text/xml, text/html, and text/x-json. A request for text/html will return YAML wrapped in HTML <pre> tags, so to get IE to display the plain-text YAML, you need to use text/html. If you use text/x-yaml, IE will prompt you to find something to open the document or save it. It is recommended you just use text/html or text/xml in IE.
(returns YAML wrapped in an HTML page, but will display in IE) https://lens-api.cites.illinois.edu/lens/uiuc-lens/device?content-type=text/html
will return XML, which IE will also display.
Firefox will default to a simple text display (YAML) if no content-type is specified.
No, access to the Lens API can be done via a programming language of your choice as long as it can perform HTTPS GET requests using Basic Auth. A response encoding (XML, JSON, or YAML) that your program can parse needs to be selected. Some examples of perl scripts can be found at the Common LENS API Requests page.
The Lens API does not presently accept the POST method for queries. You should issue your queries with GET requests and supply query parameters in the URL query string.
The Lens team can be reached at email@example.com. We would be glad to work with you on constructing the proper query to retrieve your data.