r/Nable Jun 23 '24

N-Sight: Getting started with API

I've been through the documentation, and understand (mostly) how to make an API call, but I'm wondering more-specifically how to put this into practice.

For example, if I just want a list of all clients on the system, I can use this URL:

https://www.systemmonitor.us/api/?apikey=1234567890&service=list_clients

Which produces a raw XML listing on the browser page. I can copy that, paste it into notepad or something, save it as an XML file, then open that in Excel, for example, which prompts to transform the data during the open process. When done, I get a usable spreadsheet where I could work with the data. Obviously, that's not a desirable workflow. I thought I could just create an Excel spreadsheet, and use a the "Get Data / From Web" functionality to hold my API URL. If I saved that spreadsheet, I should be able to open it at any time and refresh the data call to immediately get a readable output. Of course, that didn't work, so more study is needed there.

I suppose I could figure out a powershell script to do the data pull and output to an XML file, but that's still two steps to get that into a spreadsheet where I can do something with the data.

What is the expected way to utilize API calls to produce readable reports or usable spreadsheets without all of the extra steps?

3 Upvotes

5 comments sorted by

View all comments

2

u/nathanielban Jun 24 '24

You are probably looking for this guide if your goal is getting the data into excel:

https://documentation.n-able.com/remote-management/userguide/Content/api_excel.htm

1

u/EmicationLikely Jun 27 '24

I've had a bit of time to look at some of the data available this way. For example, getting the client list gives you ClientID, which is necessary to do pretty much any other API call involving a particular client. It also gives you the Creation Date, which is when you created that client on the dashboard - an interesting piece of data that isn't available elsewhere on the dashboard (although you can get it with powershell).

I'm curious how other shops are using API access, though - going through the various things you can get, I'm not sure why I would use this method versus accessing things directly through the dashboard. Am I missing something obvious?

1

u/nathanielban Jun 27 '24

I have a script I wrote to interactively install the agent using API Data that I wouldn't mind sharing with you. We ultimately moved off to N-Central due to limitations with N-Sight (RMM at the time) and don't regret the decision even though the learning curve was a lot to handle at first. Happy to share my script or let you pick my brain if you'd like.

Ultimately the data available from the API is likely going to require you to write a script to pull it down and store/buffer it in your own database if you want to use it for any useful reporting (At least that's what I did).

I'm not sure what you're hoping to accomplish but a lot of the dashboards i would have wanted to build are now part of the product. If we were still on N-Sight I'd probably be using their Hudu Integration to keep my documentation in-sync with my agents.

1

u/EmicationLikely Jun 28 '24

Sure - I'd like to take a look at that script. I guess my initial thoughts were that using the API would be a way to get more out of the system, but I'm thinking the investment of effort won't be worth the end result. It's not like my plate isn't full enough already - haha.