6 Replies Latest reply on May 21, 2014 11:13 AM by tdanner

    Understanding the SDK and API

    dkemens

      Hello,

       

      I'm working on building a custom dashboard for clients to review bandwidth charts and the like. This dashboard will exist in a unix environment on a php framework. Obviously, we will need to extract data from the NPM so we can store/display it locally.

       

      The implementation of the API is a bit different than I'm used to - but I think I'm getting my head around it - please correct me if I'm missing anything.

       

      We could simply query the NPM's database directly and do whatever we like with that information

       

      -- or --

       

      If we wanted to use an API, we would need to install the SDK to connect to the existing NPM installation. This is where it starts to get a bit fuzzy.... Then we could query SWIS and it, in turn, query Orion and return the data to us? Would we need to set up SWQL queries in SWIS prior or does it automatically know what to do with the majority of requests we would send it?

       

      Is it best to install the SDK on the same server as the NPM? Then we would connect to the SDK from our Linux box on 17777/17778?

       

      If somebody could just paint the big picture for me, that would be immensely helpful.

       

      Thanks

        • Re: Understanding the SDK and API
          bluefunelemental

          DK,

          The main Orion server already listens and talks on 1777x ports with any other Orion servers like additional polling engines.

          Installing the SDK is great to get the documentation and the Studio app which provides a GUI on top of this swis communication. But you don't need to go through the SDK installed apps and in fact you will most likely connect and exchange swis with the main server directly through your script or API. You mentioned Linux and there are Perl examples in the SDK docs.

          Does that help?

          1 of 1 people found this helpful
          • Re: Understanding the SDK and API
            tdanner

            If you are building a dashboard in PHP to run on unix, I recommend you use the REST API for running your queries. You do not need to install anything to do this - Orion provides this API on port 17778 as part of its normal operation. The queries to SWIS do not need to be set up in advance - you send them to SWIS as part of the POST data in your API request. See SWIS REST/JSON API for some examples.

             

            I do recommend you find a Windows box somewhere to install the SDK. The Orion server will do if you don't have a Windows workstation handy. The documentation is part of the SDK and I think it will help you get oriented. The SDK also installs SWQL Studio, a GUI tool that you can use for browsing the queryable entities and properties and for testing out queries.

            • Re: Understanding the SDK and API
              dkemens

              Excellent answers! Thank you!

               

              A REST API is exactly what I was hoping for. Somehow, reading through the documentation, I got the impression that the NPM didn't have an API without the SDK (almost as if the SDK added the feature).

               

              Thanks again!

                • Re: Understanding the SDK and API
                  tdanner

                  Glad we got that cleared up. Do you remember what you read that made believe that the API was provided by the separate SDK and not natively? If I can correct it at the source that would be ideal.

                    • Re: Understanding the SDK and API
                      dkemens

                      I'm not sure that there's any one piece of content that led me to believe that - really more of a culmination of data points.

                       

                      For instance - when I google 'Solarwinds NPM API' - the first response is this page:

                      SolarWinds Knowledge Base :: Is there an API available for the Orion family of products?

                       

                      It states:

                      • Is there an API available for the Orion family of products?
                      • The Orion SDK, an API available for the Orion family, is now available in the Orion SDK forum on thwack.com.
                        For more information about downloading and beginning to use the Orion SDK, see the post, "Orion SDK Information" in the Orion SDK forum on thwack.com.

                       

                      So - I'm immediately directed to the Orion SDK. The SDK holds the documentation and the studio, so it's not without it's own merit. Though, it would be helpful to know right off the bat that a rest api is available and [link] here's how you use it (even if [link] is to the SDK - as long as it's explained that the SDK isn't required, that's just where the documentation is).

                       

                      Reading through the Technical pdf now, I see the SWIS/REST information. I guess because it was all packaged in a single .MSI and all links point to the SDK, I figured it was a requisite.