Networking, Lens, Lens API Frequently Asked Questions
This page contains frequently asked questions (FAQs) about the API for Lens, a campus network information system.
If I use IE, I get the error: "Cannot find a Content-Type supported by your client."
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.
Do I have to use the web interface?
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.
Why can't I use the HTTP POST method? Is it supported?
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.
My results do not look correct. To whom can I talk about this?
The Lens team can be reached at firstname.lastname@example.org. We would be glad to work with you on constructing the proper query to retrieve your data.