Accessing Dashboard Insight data via api

Has anyone been able to retrieve Snaplex data that appears on the Dashboard/Insights tab via the statistics banner? Does the /api/1/rest/public/snaplex/ endpoint contain this? I’m looking for a way to show this data over time ie trends. Thanks!

1 Like

What kind of data are you interested in gathering? I don’t think we expose any of the insights stuff directly, but it may be possible to gather some of it from other APIs that are available, like you mention.

any of these numbers available?

@tlikarish are any of those standard dashboard statistics available as @tsemd described?

Hi!

There is an API we found, but it’s a bit convoluted to find! If you go to the Insights page, open Chrome dev tools, go to network, select the responses tab, and refresh the page, you should see all the API calls SL makes. One of these is an API call to obtain insights which should be like the following:

https://elastic.snaplogic.com/api/2/ID FOR SNAPLEX/rest/insights/snap

It’ll have some params for start_ts and end_ts which it uses to calculate how far back to obtain insights for. You can manipulate these params to obtain insights for any time period really.

When calling the API, supply the credentials you use to access SnapLogic and it should go through okay. I think you have to be an admin on the environment though.

Hope this helps! This is a non-standard way of of doing things, but me and our other devs couldn’t find any official documentation as to how to get this info.

Let me know if you need any more info!

Kind regards,

Daryl

1 Like

If an API is not in the documentation, it is not a public API.

There isn’t any of the insights data available through a public API, but seems like a reasonable feature to request.

In the mean time, you could use some of the public API to re-create that data collection and aggregation. For example, if you used the pipeline monitoring API you could figure out how many pipes were executed and how many documents were processed. The activity API could be used to figure out how many people had logged in, etc…

But I’d recommend waiting for us to expose the insights data through a public API.

1 Like