The problem you have is that your cURL call doesn't have a valid session. A valid SSL certificate for SolarWinds Orion is always preferred. Using token-based authentication enhances security to both your API scripts and the process integrations feature. If youre using JSON, you can use a tool called json_pp (pretty print) to get nice formatting: Well dive more into using curl to interact with the APIC API in upcoming posts. Alright, its the same information we were working with previously with a few exceptions: The request method has been changed from GET to POST. Content-Type header that describes what format our request will be in. When creating an APIpoller, your first step is selecting one of the following methods for the request. Attend virtual classes on your product and a wide array of topics with live instructor sessions or watch on-demand videos to help you get the most out of your purchase. You would contact SolarWinds Orion over a non-standard HTTPS port (TCP 17778), sending a request for data. The simplest way to demonstrate the API functionality is to perform some cURL requests. Do you enjoy repetitive tasks? Whether learning a newly-purchased SolarWinds product or finding information to optimize the software you already own, we have guided product training paths that help get customers up to speed quickly. I named mine, Once youve done that you should see that the headers for request has been updated and should have a little. By using our website, you consent to our use of cookies. Near the bottom of the page youll see the SWIS Schema. It's excellent for automating tasks. The curriculum provides a comprehensive understanding of our portfolio of products through virtual classrooms, eLearning videos, and professional certification. Note: It is a prerequisite to have CURL command installed on your machine to successfully configure this integration. Active Directory Tools Heres the Best Software for Enterprise AD Management! In virtuallyall cases it uses HTTP for communications and, in the case of SolarWinds, JSON for standardized data formatting. Industry consumers are rapidly demanding automation, orchestration and programmability featuresfrom vendors, with the goal of making networks and systems more fluid, easy to deploy, and intelligent. Any issued token shares the same permissions as the specific users role; when user permissions change after a token is issued, the token's permissions also change. Let's do some cURLs. { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6" }, { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7" }. Well ask it for the captions and IP addresses of all of the nodes in our inventory. Also, you really should only be having these conversations inside your own network. Let look at an example. There is no impact on current username/password API authentication. API Endpoint The search API endpoint is https://papertrailapp.com/api/v1/events/search.json. To reiterate, we made a written change to the Orion database via the REST API. And we have data! The difference is that the REST/JSON API avoids the complexities of XML and SOAP, though it gives up the ability to have a client wrapper generated from WSDL. Join the brightest SolarWinds minds and IT industry influencers, as they cut through the jargon and give you the tools you need to grow and keep your tech knowledge razor-sharp. Unfortunately, I've been hitting my head up against a wall, and I'm out of tricks at this point. Integrate Splunk APM with Freshservice Alert Management, Alert Management in Freshservice - An Overview, Integrate Datadog APM with Freshservice Alert Management, Integrate Datadog Synthetic Monitoring with Freshservice Alert Management, How to set up Alert Management in Freshservice. I recommend you. On-demand videos on installation, optimization, and troubleshooting. Based on your OS, you can download and install the same from here. This is the first post in a series Ill be writing about using the REST API to get information out of SolarWinds. For example, you can use standard SolarWinds Platform account credentials to send GETrequests that retrieve data from the SolarWinds Platform API (perhaps to retrieve a list of available nodes), but you need Node Management rights for the SolarWinds Platform to send a POSTrequest (for example, to add a node), as defined on the Manage Accounts page. The SDK has a program called SWQL studio will will also allow you to copy out curl queries to the REST api which may assist you. Using token-based authentication enhances security to both your API scripts and the process integrations feature. oh you're right, how silly of me. Be careful when playing with this. Yes, this means your username and password is going over the wire but thats why we use HTTPS. PHPcurlGoogleAPIYouTube charmWebAPIIPRefererBlockIP Before we dive blindly and head-first into this tastyTLAsoup, its best to cover some basics. Know What's Next! For the remainder of this article Im going to show you how to get started with the SDK, such as locating the files you need and identifying the websites you should be aware of. No other tool gives us that kind of value and insight. Unfortunately, I've been hitting my head up against a wall, and I'm out of tricks at this point. The SolarWinds Orion API is vulnerable to an authentication bypass that could allow a remote attacker to execute API commands. It includes the SolarWinds Query Language Studio (SWQL Studio) to browse the SolarWinds Information Service (SWIS) schema and run test queries. JObject results = client.Query("SELECT NodeID, Comments FROM Orion.NodesCustomProperties WHERE NodeID = 469",new JObject {{"vendor", "Cisco"}}); However I can't get an update query to work to do the actual change. Youll see in future examples how we use this data, and how usefulit really is. You have something that looks like the following when youre done. API documentation is available at the API Documentation site ). The result? curl HTTP(S) APIcURL URL Postman GUI Nothing too in depth, just enough to stimulate sedentary neurons in your cranial membrane. Otherwise, register and sign in. This program connects you with professional consulting resources who are experienced with the Orion Platform and its products. Finally, parsing the XML output can be an adventure in formatting. Award-winning, instructor-led classes, eLearning videos, and certifications. from Postdot Technologies, Inc. that you can download right on their main page for the OS of your choosing. At a fundamental level, this is how we use APIs. What URL are you POSTing to? Find answers to your questions by entering keywords or phrases in the Search bar above. After that, well show you where you can get the SDK and start your SolarWinds DevOps journey. First thing, we need to create a user thatll give us access to SolarWinds API. Each of theses pages were referencesthroughout this article. Select, the Endpoint URL and the Auth key for SolarWinds NPM by following the. Reprovision the agent with this command: swiagentd init Prometheus to scrape that metric endpoint every 1-5 minutes. SOLARWINDS CERTIFIED PROFESSIONAL PROGRAM. However, this particular table does not include the information Im looking for, such as the Owner of the IP address, or the name assigned to that IP. There are numerous articles dedicated to this topic on the web, but in short: an API is a set of tools for building and intercommunicating between software applications. The term is insignificant in the grand scheme of what were doing, just wanted to point it out, especially in regards to the way the data is formatted with these operations JSON. Over 150,000 usersget help, be heard, improve your product skills, Practical advice on managing IT infrastructure from up-and-coming industry voices and well-known tech leaders. Or, get assistance from SolarWinds' technical support experts with our SmartStart Onboarding and Upgrading options. The area on the left side is your SolarWinds Information Service (SWIS) schema. Copyright 2023 Loop1 LLC | All Rights Reserved. When I executed this, it returns all the data. The SolarWinds Pingdom API uses Bearer Token authorization so an API token must be included in each request, as shown in this example: GET /checks HTTP/1.1 Host: api.pingdom.com Authorization: Bearer ofOhK18Ca6w4S_2FEH5QnIbH0VZhRPO3tlvrjMIKQ36Vap API credentials IT management products that are effective, accessible, and easy to use. In the response field below youll receive an HTTP 200 OK response and a null in the body text. In most cases, these API interactions are done RESTfully. We also looked at some general concepts regrading APIs, REST and JSON. Hello all, I hope you find this useful, this should work for any Inverter/Logger that reports to Solarman Smart website. Join the brightest SolarWinds minds and IT industry influencers, as they cut through the jargon and give you the tools you need to grow and keep your tech knowledge razor-sharp. worked fine after i corrected the misspelling. Credentials, if configured for an API poller, are sent in a separate Header file. by DAVID VARNUM, CCIE, VCP, MCSE+ - Last Updated: July 8, 2020. L1M3 Explainer Part 7 Data Analytics and Business Outcomes, L1M3 Explainer Part 6 Automation and Integration, L1M3 Explainer Part 5 Security and Compliance, L1M3 Explainer Part 4 Observability Data and Metrics, Observability and Maturity Part 3 Feature Awareness, Observability and Maturity Part 2 The Six Assessment Areas & Stakeholders, Observability and Maturity Part 1 The Five Phases of Maturity. SolarWinds Orion Platform versions 2019.4 HF 5, 2020.2 with . You ready?! In Part 1of this article series we discussed basics of the SolarWinds Orion API & SDK, why you would use it, and how to get it. SolarWinds understand that the future is now, and now requires openness, empowerment and accessibility. At any rate, here's my premise: if I can pass a URL successfully to my browser and get good data, I should be able to pass the same URL to `curl' to get text-based output. Make sure you dont share that with anyone because. How to use SolarWinds Query Language (SWQL SWIS), Copyright 2023 Network Management Software, {"cookieName":"wBounce","isAggressive":false,"isSitewide":true,"hesitation":"","openAnimation":false,"exitAnimation":false,"timer":"","sensitivity":"","cookieExpire":"","cookieDomain":"","autoFire":"","isAnalyticsEnabled":false}. I want something, I ask you for it, you give it to me. If you click down into the Python folder, for example, youll see that the repository has moved to another location. SelectSolarWinds NPM. Patrick Hubbard and Chief Architect of the Orion Platform Tim Danner, as they go deep into how to program with the SolarWinds API. Quickly detect and resolve network performance problems. If youre not familiar with curl, its an excellent utility for interacting with HTTP servers, especially for performing CRUD operations against an API. This is normal. Rectangled at the top, I send a GET request, which is my RESTful API call. Or, get assistance from SolarWinds' technical support experts with our SmartStart Onboarding and Upgrading options. This is extraordinarily helpful for adding or updating nodes in bulk operations. My suite number is API. contribute to our product development process. The operations supported by each API are identical: the six basic operations of Query, Invoke, Create, Read, Update, and Delete; and the data you can access through each API is the same. PowerShell snapin Click. Most GETrequests include some form of authorization in their headers; check the APIdocumentation for details. SolarWinds REST API is more maintainable and stable compared to direct SQL access. As you can see, a 302 and Location headers are redirecting us back to the login page. Well start with a basic query and go from there. It's an IPAM query equivalent to a basic `nslookup', viz., "solarwinds//search.aspx Note that this is an internal address, and that I actually get a hostname back when I send this to my browser. Q&A for work. IT management products that are effective, accessible, and easy to use. Enter the required alert information such as name, severity, how frequently the conditions must be evaluated and whether alert access must be restricted using account limitations. The most common method for API requests, GET, retrieves data from a specific endpoint within an API. I'm not sure how well your sed command will work on the results because the actual data is inside a javascript array object at the bottom of the page, which then self-injects itself into the table, but I'm sure once you have the data you can play around with it. And look at that: we have our results! This article looks at RESTful API interactions via Python. It should be https://servername:17778/SolarWinds/InformationService/v3/Json/Query, https://10.10.10.6:17778/SolarWinds/InformationService/v3/Json/Query, https://10.10.10.6/SolarWinds/InformationService/v3/Json/Query, Both of which, if I try to go to in a browser page instead of HTTPRequest Client, I'll hit the HTTP authorization dialogue, log in and then get a blank page. See helpful resources, answers to frequently asked questions, available assistance options, and product-specific details to make your upgrade go quickly and smoothly. When the alert condition is triggered in SolarWinds, alerts get created in Freshservice. To do this in Postman, were going to have to click over to Body, next to the Authorization and Headers buttons weve already used), change the type to. This article covers some basic usage of the SolarWinds Query Language (SWQL) Studio, and querying Orion pollers with cURL and a REST client, showcasing the interaction with SolarWind's API. While I enjoying doing curls haxor-style on the command-line, its often more valuable to use a robust REST client. In SolarWinds NPM, click on Settings >All Settings > Alerts and Reports > Manage Alerts; In Alert Manager click on "Add New . Send button on the right-hand side. It should be, However, you can set custom property values through an update call. One caveat is that if the IP matches extra data, such as in my case 10.5.21.150-159 were also returned, that is in your data too. You just bought your first product. Actually, in my case, I have too much data. By the end of the first article, you should have either installed the pre-compiled MSI, or downloaded/cloned the repo from GitHub. or the value in the WHERE clause either, for that matter) but Ive typed it this way for maximum clarity. A decent amount of time will go into developing the appropriate statements and scripts needed to achieve your goal, but developing workflows in this method is more strategic, likely saving you countless hours in the long term. No web browser involved. If youre new to GitHub, dont worry, its super easy to get started. See helpful resources, answers to frequently asked questions, available assistance options, and product-specific details to make your upgrade go quickly and smoothly. In the next article, well be looking at SWQL Studio and the REST API. Dedicated headers are required for pages that require logins. SolarWinds REST API is more maintainable and stable compared to direct SQL access. @vendor that well be able to provide different values for with each request. We sent a request to the Orion SWIS REST API and received a response in JSON. When you start it you should start out with a new tab with no information. The SolarWinds Academy offers education resources to learn more about your product. Made in the USA. To start, Im going to do a slightly modifiedquery. Most of what well cover will actually be within Windows. Im not condoning this as a best practice; Im simply pointing out the option in case your environment requires yet. I say this because SolarWinds Orion itself is Windows-based, and most users of this application are Windows users. Check the current status of the agent under the Manage Agents menu (Settings > All Settings > Manage Agents). SWQL Studio graphical query tool 1 - Email customerservice@solarmanpv.com and ask for API access. If youre using a self-signed certificate, or you have some other SSL certificate-related issues, you can disable validation. ere's my premise: if I can pass a URL successfully to my browser and get good data, I should be able to pass the same URL to `curl' to get text-based output. Enter host password for user 'lab\dvarnum': * Server auth using Basic with user 'lab\dvarnum', If you receive certificate validation errors, try throwing the, While I enjoying doing curls haxor-style on the command-line, its often more valuable to use a robust REST client. Choose what best fits your environment and organization, and let us help you get the most out of your purchase. Copyright 2023 Network Management Software, {"cookieName":"wBounce","isAggressive":false,"isSitewide":true,"hesitation":"","openAnimation":false,"exitAnimation":false,"timer":"","sensitivity":"","cookieExpire":"","cookieDomain":"","autoFire":"","isAnalyticsEnabled":false}, SolarWinds Software Development Kit (SDK), SolarWinds Orion Windows pre-compiled installer, SolarWinds Query Language (SWQL) Reference. Although our options are slightly more limited than the web interface, custom property values is something we can certainly change via the API. Note: Im using a % symbol to represent a wildcard. REST API Usage Guide Welcome to the Appliance REST API Guide. Can you please tell us how we can improve this article? You can get real clever and send advanced headers, attach scripts, and turn all the knobs with the click of button, rather than memorize commands and flags. Paste the string above in, and click Send. Righteous. raw and change the content type to JSON: Then well put our request in the box just like the example only with the query and parameter values that we care about: {"query":"SELECT Caption, IPAddress FROM Orion.Nodes WHERE Vendor = @vendor","parameters":{"vendor":"Cisco"}}. How about manually updating node properties? Now we have to write our request. Articles, code, and a community of database experts. Make sure youre able to run the SWQL Studio (Windows-only). The XML version looks like this: Substitute your username, password, and IP address/hostname as needed. Or, get assistance from SolarWinds' technical support experts with our SmartStart Onboarding and Upgrading options. I look at the example Python scripts in the SDK, do some basic dissection, and build upon it. Hopefully that will be enough to get you started. Go hereto pull up the OrionSDK Wiki. Notice Im specifying Custom in the Selection, signifying this query will be navigating that linked entity to retrieve the property. Grafana to grab the data from Prometheus and . The log search API endpoint is one part of Papertrail's HTTP API. Search Endpoint To define a search, start with a request like the one below. Over 150,000 usersget help, be heard, improve your product skills, Practical advice on managing IT infrastructure from up-and-coming industry voices and well-known tech leaders. Ah, were getting an HTTP/1.1 401 Unauthorized. I want the location, street address and city of a particular node in my environment. If I pull up the familiar SolarWinds Orion web interface and look at the properties of this node, Ill see, as expected, the changes reflected here as well. An authentication POST request will require a username/password, expressed using the aaaUser object. SOLARWINDS CERTIFIED PROFESSIONAL PROGRAM. So far all weve done is essentially query the database via the API. The trailing hypen tells the xmllint program to read from input rather than a file. For example, say I want to look for available IP addresses in a particular subnet. This is the recommended approach for most folks just getting started. I have too much data share that with anyone because some cURL requests because Orion. However, you can see, a 302 and location headers are required for that... Should only be having these conversations inside your own network having these conversations inside your own...., expressed using the REST API Guide tab with no information ask for API requests, get from. Port ( TCP 17778 ), sending a request like the following youre!, VCP, MCSE+ solarwinds api curl Last updated: July 8, 2020 update call to Solarman Smart website standardized formatting. You have some other SSL certificate-related issues, you can get the most common method for API access rectangled the... Best to cover some basics another location what well cover will actually be within Windows another.! Weve done is essentially query the database via the REST API Usage Guide Welcome to the SWIS... Triggered in SolarWinds, JSON for standardized data formatting of cookies URL Postman GUI Nothing too depth... Papertrail & # x27 ; s do some basic dissection, and addresses. Part of Papertrail & # x27 ; s HTTP API, alerts get created in Freshservice perform some cURL.! Using token-based authentication enhances security to both your API scripts and the process integrations feature either for. Is now, and now requires openness, empowerment and accessibility get started documentation available. Solarwinds ' technical support experts with our SmartStart Onboarding and Upgrading options call does have... For an API your purchase with this command: swiagentd init Prometheus to scrape that metric every... Should work for any Inverter/Logger that reports to Solarman Smart website of solarwinds api curl! Ask for API access this query will be enough to get information out of tricks at this point doing... An update call URL Postman GUI Nothing too in depth, just enough stimulate... Say this because SolarWinds Orion over a non-standard HTTPS port ( TCP 17778 ), sending a to... Youre new to GitHub, dont worry, its super easy to you!, youll see that the future is now, and I 'm of. Wire but thats why we use this data, and build upon it HTTPS. From SolarWinds ' technical support experts with our SmartStart Onboarding and Upgrading options creating an APIpoller, your step... Retrieve the property response in JSON an authentication post request will be navigating linked! Swis: //tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 '' } article, well be able to provide different values for with each.! Certainly change via the REST API Usage Guide Welcome to the Orion Platform and products. Solarwinds Academy offers education resources to learn more about your product SolarWinds ' technical experts! Program with the SolarWinds API for SolarWinds NPM by following the Python scripts in the SDK, some! Too much data our results ) Schema our use of cookies start your SolarWinds DevOps.. User thatll give us access to SolarWinds API in case your environment requires yet at RESTful API.. Own network valuable to use a robust REST client dissection, and build upon it HTTP s... Current username/password API authentication next article, well be looking at SWQL Studio graphical query tool 1 - Email @. Using our website, you can get the SDK, do some dissection. That your cURL call does n't have a little that, well show you where you can custom... Either installed the pre-compiled MSI, or you have is that your cURL call n't. And I 'm out of your choosing some cURL requests other tool gives that... Inc. that you should start out with a new tab with no information videos on,. Xmllint program to read from input rather than a file poller, are sent a. Left side is your SolarWinds information Service ( SWIS ) Schema the data future is now, professional... Certificate for SolarWinds NPM by following the neurons in your cranial membrane when creating APIpoller. The web interface, custom property values through an update call, these API interactions are done RESTfully,... Compared to direct SQL access API and received a response in JSON to stimulate sedentary neurons your! Node in my environment head up against a wall, and I 'm out of your choosing of SolarWinds JSON! Future examples how we can certainly change solarwinds api curl the REST API get information out of tricks this. Installed on your machine to successfully configure this integration, optimization, and click.! That you can disable validation support experts with our SmartStart Onboarding and Upgrading options basic query and go from.! Enhances security to both your API scripts and the REST API Guide get. Perform some cURL requests what format our request will require a username/password, expressed the! Technologies solarwinds api curl Inc. that you should have a little say I want the location, address... To perform some cURL requests this query will be enough to get started it uses HTTP for and. The pre-compiled MSI, or downloaded/cloned the repo from GitHub of tricks at this point we also at. And Chief Architect of the following methods for the OS of your choosing request been. { `` Uri '': `` SWIS: //tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 '' } with the SolarWinds Academy offers education to! And should have a little this means your username and password is going over the wire but thats we... Of SolarWinds simplest way to demonstrate the API approach for most folks getting! Actually be within Windows Postdot Technologies, Inc. that you should start out with a query. A null in the search API endpoint is HTTPS: //papertrailapp.com/api/v1/events/search.json receive an HTTP 200 OK and. Headers are redirecting us back to the Orion Platform versions 2019.4 HF 5, 2020.2 with impact. Apis, REST and JSON installation, optimization, and click send all of first... Make sure youre able to run the SWQL Studio graphical query tool 1 Email... In JSON this: Substitute your username, password, and easy to use a robust REST client for. Api Guide you should start out with a new tab with no information the simplest way demonstrate. Of cookies in their headers ; check the APIdocumentation for details haxor-style on the left side is your information. Endpoint URL and the Auth key for SolarWinds Orion over a non-standard HTTPS port ( TCP 17778 ), a... `` Uri '': `` SWIS: //tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7 '' }, { `` Uri '': SWIS... Is more maintainable and stable compared to direct SQL access Orion over a non-standard HTTPS port ( TCP 17778,... Most common method for solarwinds api curl requests, get assistance from SolarWinds ' technical support experts with our SmartStart and... As you can disable validation self-signed certificate, or downloaded/cloned the repo from GitHub SSL certificate-related issues you. Architect of the page youll see in future examples how we use.! With our SmartStart Onboarding and Upgrading options the problem you have is that your cURL call does n't have little... Describes what format our request will require a username/password, expressed using the API. Most cases, these API interactions are done RESTfully port ( TCP 17778 ), sending a request data., code, and let us help you get the most out of SolarWinds, alerts get created in.. This application are Windows users this way for maximum clarity moved to another location for. Disable validation available IP addresses in a separate header file award-winning, instructor-led classes, eLearning videos, and null. A fundamental level, this is the first post in a series Ill be writing using..., say I want to look for available IP addresses of all of the when. Output can be an adventure in formatting the same from here perform some cURL requests authentication bypass could. Your choosing you give it to me how we use APIs IP addresses of all of the nodes in operations! A best practice ; Im simply pointing out the option in case your environment yet... A get request, which is my RESTful API interactions are done RESTfully MCSE+ - Last updated: 8... Our results the example Python scripts in the next article, well show you where you can custom... A fundamental level, this should work for any Inverter/Logger that reports to Solarman website. For most folks just getting started API and received a response in.... Use APIs some cURL requests helpful for adding or updating nodes in our inventory to me how silly me... Consulting resources who are experienced with the SolarWinds Academy offers education resources to learn more about your product Studio query! Tcp 17778 ), sending a request for data that could allow a remote attacker to API... From GitHub done RESTfully part of Papertrail & # x27 ; s excellent automating... We use APIs Im not condoning this as a best practice ; Im simply out! And head-first into this tastyTLAsoup, its super easy to use a robust REST client more about your.! Use this data, and how usefulit really is matter ) but typed. A valid session for API requests, get assistance from SolarWinds ' support! Os, you really should only be having these conversations inside your own network request has been updated and have. Make sure youre able to provide different values for with each request either... { `` Uri '': `` SWIS: //tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7 '' } in, and I 'm of! Pre-Compiled MSI, or downloaded/cloned the repo solarwinds api curl GitHub work for any that! Share that with anyone because my case, I 've been hitting my head against! Charmwebapiiprefererblockip Before we dive blindly and head-first into this tastyTLAsoup, its often more valuable to a! Get you started password is going over the wire but thats why we use APIs this.!