Skip to main content

Demo video: Use APIs to send sample data into Moogsoft Cloud

Use APIs to send sample data into Moogsoft Cloud

In this video, you will learn how to use best practices in managing API keys, navigate the Moogsoft API docs to locate relevant information, and build Event and Metrics API commands.

Suppose you have a monitoring tool collecting metric and event data, and you want to route that data to Moogsoft using our Event and Metric APIs.


You can build the integration right in our API documentation. Let me show you how.

But first, a little bit about API key management.


You need an API key to push data to Moogsoft. The best practice here is not to use the primary API key as you see in the events API ingestion service page.

Rather, we recommend you create an API key that is revocable. This way you can grant and remove access to Moogsoft for different users and applications.


Here, you can create and revoke the keys as needed.


Let’s create one! Provide a meaningful name and description so other administrators would know what this key is about.


And the API key is generated for you to copy and use.  For security reasons, you will not be able to reference it once you move away from this screen.


When and if you need to revoke it, you can do so here.


Next, we are going to use our Moogsoft API documentation. Here’s a Metrics API sample code that includes the required fields and optional fields for this endpoint.


Here’s the endpoint for the Metrics API.


This is sample code on how to implement this API in a variety of languages.


To make this code speak to your instance of Moogsoft, add the API key you generated and copied earlier. Now the sample code is updated to include your key.


Same with the parameters. As you edit them the sample code automatically gets updated. When ready, click on Try It to actually ping your instance with this sample code.


Here’s the response. Looks like we are successfully communicating with our instance of Moogsoft!


This is how you can build your integration with some level of assurance that it works.


Once you fully develop your integration, copy and paste the resulting code into a CLI.


We could also build shell scripts to add additional logic and conditionals that we simulated in the api docs site. Event API works the same way if you want to ingest both events and metrics.


Now you know how to use our API documentation to send sample data into Moogsoft, then use it to create your own code.  Thanks for watching!