Log Insight: GET Configuration APIs

You may recall that I stated that a Tech Preview of configuration APIs was made available in Log Insight 3.3. I have been asked on more than one occasion where the documentation for the configuration APIs reside. Unfortunately, the documentation has not been published yet so I figured I would provide some information to get you started. Read on to learn more!

li-logo

Before We Begin

UPDATE: This post has been DEPRECATED. Please refer instead to https://sflanders.net/2016/10/19/log-insight-configuration-apis/.

Disclaimer: These are TECH PREVIEW APIs meaning they are not supported and may change or even be removed in a future version of Log Insight. You have been warned.

Authentication

Before you can use the configuration APIs, you must authenticate. While I have covered authentication in the past, I wanted to provide a Bash alias I use to in order to pass around the session ID required:

UPDATE: This post has been DEPRECATED. Please refer instead to https://sflanders.net/2016/10/19/log-insight-configuration-apis/.

GET vs. POST

As the title of this post indicates, I plan on covering most of the GET configuration APIs available today. The reason for this is because the GET configuration APIs only require that you know the METHOD to call. I may cover the POST configuration APIs in a future post or wait for the documentation to get published.

GET Configuration APIs

My goal is not to provide documentation for all of the GET configuration APIs — as that should be made public soon — but instead to provide a list of GET configuration APIs you can call today. Similar to the authentication Bash alias above, I have created another Bash alias for the GET configuration APIs:

UPDATE: This post has been DEPRECATED. Please refer instead to https://sflanders.net/2016/10/19/log-insight-configuration-apis/.

Example: Agent Statistics

I wanted to provide an example of how to use the above Bash aliases based on the most common configuration API request I have received: how to get the agent statistics information from the /admin/agents page. To do this, I would first call the authentication alias followed by the configuration alias as follows:

UPDATE: This post has been DEPRECATED. Please refer instead to https://sflanders.net/2016/10/19/log-insight-configuration-apis/.

Enjoy!

© 2016, Steve Flanders. All rights reserved.

Leave a Reply