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. Looks like I missed this question in December. The method you use for an APIrequest depends on: Similar to how you need different rights to perform various tasks in most applications, you need rights to use different methods against an external API and get a successful response. If the request is successful, data is returned in a response payload. Learn about API security, integration interfaces, and ways you can turn Orion into an automation platform for enterprise monitoring. Youll see the folder structure and files included as a part of this software package. 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. A script that calls the Mirth API, and exposes the metrics in Prometheus file format. And while I've been scripting for a while, I feel I'm still relatively new to `curl'. You want to use the API and SDK to automate repetitive tasks, or to integrate with some other external script or application, or to provide intelligent reporting. If you guessed WHERE, youre right. 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. Best WMI Tools & Software for Windows Management Instrumentation Administration! Maybe you started using Postman to run API queries, but you want to build a succession of queries and roll them up in a script. Now what? { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=4" }. The area on the left side is your SolarWinds Information Service (SWIS) schema. Prometheus to scrape that metric endpoint every 1-5 minutes. Nearly all vendors are offering, or starting to offer, APIs and SDKs to accomplish this goal, placingthe control in the hands of the user. SolarWinds suggests planning a transition process to update your current API connections if necessary, moving to the token format. Check the current status of the agent under the Manage Agents menu (Settings > All Settings > Manage Agents). Next well want to add authentication. However, when I try to lookup the same URL from the command line, I dont get the expected output. Connect and share knowledge within a single location that is structured and easy to search. You ready?! SolarWinds uses cookies on its websites to make your online experience easier and better. 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. Grafana to grab the data from Prometheus and . : . 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. First, let's store the content in a content.txt file: $ echo "simple_body" > content.txt. These lines tell us a few important things: Were going to use GET as our method for requesting basic information from the API in the form of a SolarWinds Query Language, The API lives on port 17778, uses HTTPS, and requires the, portion be tacked onto the end of the host:port before we even get into what were asking it to do, To start well get at least this much information into our new Postman query. Right-click this and choose Generate Select Statement. Configuration in SolarWinds NPM. On-demand videos on installation, optimization, and troubleshooting. If youre interested in these samples, or wish to clone the repo, make sure you visit this link. In the next article of this series well be looking at Python and PowerShell scripting, and how this can be utilized to automate tasks, enhance workflows, add value and open doors to multitudes ofpossibilities. However, you can set custom property values through an update call. To perform other HTTP operations (HEAD, PUT, DELETE, POST, etc), you might use the -X switch: curl -X POST -d "some data" http://example.com/api/path/to/object. Most of what well cover will actually be within Windows. Need to report an Escalation or a Breach? cURL is preloaded on Mac OSX, but its also available on Windows here, or download Cygwin and load it there. To do so Ill pass my username in the syntax. We can retrieve this data via the REST API. #thingsyouwillneverhearmesay. The two boxes on the right are your query window (top), and the results window (bottom). This is normal. Well use curls -c switch to save the info in a cookie file, named COOKIE: Then, you simply use -b COOKIE in subsequent requests, such as retrieving a list of tenants: You can pass XML output through the xmllint utility to format (indent) it: Dont forget that trailing hyphen! Thats it for this one. VXLAN/EVPN Configuration Example (N9k / p2p). All rights reserved. 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. By building their applications on top of the SWIS API, SolarWinds as an organization and as a comprehensive suite of applications, extends this accessibility to the end-user. Chris Beach, anotherQuora commentator, explains the difference between interacting with a web-based application without an API versus with an API. 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. In SWQL it would look like this: Looks like the command was accepted, but I didnt get any response. Wireshark Alternatives for Packet Capture, Analyzing and Sniffing! Hello . An authentication POST request will require a username/password, expressed using the aaaUser object. In other words, they themselves are using the API. Find the latest release notes, system requirements, and links to upgrade your product. The SolarWinds Academy offers education resources to learn more about your product. Currently, you have read access to various Orion modules: Network Performance Monitor (NPM) Server Application Monitor (SAM) IP Address Manager (IPAM) NetFlow Traffic Analyzer (NTA) VoIP Network Quality Manager (VNQM) 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. SWQL Studio graphical query tool Let look at an example. To determine whats going on Ill enable verbose mode and try again. Cisco ACI Inter VRF/Tenant Route Leaking Design Simplified! Most of the SDK will function in Mac OSX and Linux, aside from the SWQL Studio and PowerShell scripts. Articles, code, and a community of database experts. Each of theses pages were referencesthroughout this article. The problem you have is that your cURL call doesn't have a valid session. The response will include a session token and a number of attributes. Head to the Admin panel, scroll down to IT Operations Management, and select, You are now on the Monitoring Tools list page. Articles, code, and a community of database experts. Youve probably used curl to download a file from a webpage, like this: curl http://www.unofficialaciguide.com/index.php. And while I've been scripting for a while, I feel I'm still relatively new to `curl'.. At any rate, h 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. To save time, copy the query URL below to the new tab and set the request type to POST: your user from the last exercise should already be there. Simply send this instruction as an HTTP GET via the REST API. or the value in the WHERE clause either, for that matter) but Ive typed it this way for maximum clarity. Rather than searching and clicking monotonously through the web interface, you can retrieve the same data via a single streamlined RESTful API call. Moreover, its not just conversations, agreements and contracts between endpointsthat make APIs so critical. To make things a bit easier, Im going to reduce my query down to just a few items in particular, lets say: NodeID, ObjectSubType, NodeDescription, Description, Vendor, MachineType. We also looked at some general concepts regrading APIs, REST and JSON. JObject results = client.Query("UPDATE Orion.NodesCustomProperties SET Comments= 'It Worked' WHERE NodeID = 469", new JObject { { "vendor", "Cisco" } }); Does anybody have a quick and dirty PHP client, prehaps? Customers Also Viewed These Support Documents, http://www.unofficialaciguide.com/index.php. CURL API . Your SolarWinds products come with a secret weapon. All API requests are authenticated using either: An API token in the X-Papertrail-Token HTTP header (recommended). Clickon Submitafter the configuration is done. You do not want to inadvertently delete your Orion database, or destroy one of your Orion pollers. 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. Params button to expand the parameters interface. Award-winning, instructor-led classes, eLearning videos, and certifications. These requests typically include additional data in the message body, as opposed to GETrequest that may include all necessary details in the request URL. We support all of our products, 24/7/365. Leave GET as our query method, and enter your query in the bar next to it. All rights reserved. I stumbled upon an especially helpful article which also includes and downloadable XLS file with examples here. It includes REST API examples, PowerShell examples, Python examples and more. The SolarWinds Orion API is vulnerable to an authentication bypass that could allow a remote attacker to execute API commands. In this series, we'll explore using curl on the command line and in simple shell scripts for quick, repeatable operations. A glossary of support availability, tips, contact info, and customer success resources. Be careful when playing with this. We can do that. ~$ curl https://orion:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+IPAddress+FROM+Orion.Nodes+WHERE+NodeID=7500, ~$ curl -v https://orion:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+IPAddress+FROM+Orion.Nodes+WHERE+NodeID=7500, * Connected to orion (10.10.12.36) port 17778 (#0), * TLS 1.0 connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, > GET /SolarWinds/InformationService/v3/Json/Query?query=SELECT+IPAddress+FROM+Orion.Nodes+WHERE+NodeID=7500 HTTP/1.1, * Connection #0 to host orion left intact, ~$ curl -v -u lab\\dvarnum https://orion:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+IPAddress+FROM+Orion.Nodes+WHERE+NodeID=7500. Use a double backslash to escape it from the shell. You can't update this way. If port test succeeds, it will show "TcpTestSuceeded: True". Fend physically protects your connected equipment from cyberattack and ransomware. We sent a request to the Orion SWIS REST API and received a response in JSON. 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. The trailing hypen tells the xmllint program to read from input rather than a file. Based on your OS, you can download and install the same from here. If you have a request, please feel free to shoot me an email at sklassen@loop1.com! This program connects you with professional consulting resources who are experienced with the Orion Platform and its products. API documentation is available at the API Documentation site ). For information on where to add the token in the CURL command, see SolarWinds Service Desk API. curl HTTP(S) APIcURL URL Postman GUI These custom properties are actually stored in IPAM.IPNodeAttr. Once downloaded, youll see the same folder structure locally on your machine as you do in GitHub repo. Calling the API from outside the appliance. 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}. Unlike the GETmethod that requests data from an external API, the POSTmethod is used to send changes to an APIendpoint. 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. Notice how I concatenate the commands with + symbols. The Event Search API is split across two different endpoints: one to define the search and another for retrieval of resulting events. Does anyone have an example of how to get this into a C# application ? Scott Cheney, Manager of Information Security, Sierra View Medical Center, Issues with this page? Ultimately, I want to get IP Assignment History. As a simple example, the data you might get back from SolarWinds in JSON would look something like this: We can then take this beautiful data, parse it, manipulate it and perform all sorts of wonderful tasks with it. SolarWinds Onboarding programs are designed to help walk you through product installations, upgrades, and more to deliver immediate value on your product experience. These services are provided at no additional charge for customers who were/are running one of the Orion Platform versions affected by SUNBURST or SUPERNOVA. Dont call SolarWinds TAC and ask why your Python script is throwing a key error; they wont be able to help you. ='Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)'. This is why SWQL Studio was created, to make query building much easier. This is the API for managing the appliance via curl or other web based calls. SolarWinds will receive the response, and as long as its valid, return the result in JSON. I have not used REST API before, we are trying to set up the SolarWinds API in to a centralized dashboard tool (Squared Up). Notice items with the icon resembling a link or chain: This means you can reference these in relationship queries. You can also set alert rules to create contextual incidents to route it to the right team for a quick resolution. OAP services also include assistance with your digital code-signing certificate update. Papertrail's API supports cross-origin resource sharing ( CORS ), so it's possible to retrieve log data from another domain. Why am I doing this? In this scenario, imaging pulling weather data from weather.com. My goal here is to update that with the suite ID of the apartment complex. This is the first post in a series Ill be writing about using the REST API to get information out of SolarWinds. SolarWinds Certified Professional Program, Upgrading Isn't as Daunting as You May Think, Upgrading Your Orion Platform Deployment Using Microsoft Azure, Upgrading From the Orion Platform 2016.1 to 2019.4, How to Install NPM and Other Orion Platform Products, Customer Success with the SolarWinds Support Community, Hybrid Cloud Observability Technical Documentation, Hybrid Cloud Observability Product Details, SolarWinds Observability Technical Documentation. Go to the Code tab. The query is no longer on the first line in a query string but rather has been moved down into the body of the request. SolarWinds uses cookies on its websites to make your online experience easier and better. 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. For example, to use a GETrequest to retrieve data from the SolarWinds Platform SDK, no extra rights are required other than the SolarWinds Platform account credentials included in the parent request. Note: It is a prerequisite to have CURL command installed on your machine to successfully configure this integration. Thats the base64-encoded version of your username:password pair. Developed by network and systems engineers who know what it takes to manage today's dynamic IT environments, SolarWinds has a deep connection to the IT community. For example, say I want to look for available IP addresses in a particular subnet. Starting with NPM 10.4, SWIS now supports a REST/JSON API in addition to the existing SOAP API. If you go one step. Another way to do this is to save the output to a file, and then read the file using xmllint (or your favorite XML editor). For example, to use a POSTrequest that adds a node to the SolarWinds Platform database, your SolarWinds Platform account must have Node Management rights.