Visiting it in a browser won't do anything for you - it has no page to show. So far all weve done is essentially query the database via the API. To do this, theres an excellent free cross-platform utility called. Youll see in future examples how we use this data, and how usefulit really is. SolarWinds suggests planning a transition process to update your current API connections if necessary, moving to the token format. Most of what well cover will actually be within Windows. You can't update this way. 2 - Go to Run Curl Commands . Only someone with an SWSD admin license can generate an API token. Your SolarWinds products come with a secret weapon. No other tool gives us that kind of value and insight. A valid SSL certificate for SolarWinds Orion is always preferred. Connecting Physical Servers To Cisco ACI Fabric - Simplified! Now we have to write our request. Active Directory Tools Heres the Best Software for Enterprise AD Management! A full-stack hybrid cloud Observability solution built to optimize performance, ensure availability, and reduce remediation time. More than 190,000 members are here to solve problems, share technology and best practices, and directly SolarWinds Orion Platform versions 2019.4 HF 5, 2020.2 with no hotfix installed, and 2020.2 HF 1 are affected. No web browser involved. In SWQL it looks like this: So my query looks something likebelow. HTTP Basic Authentication with a papertrailapp.com username and password. You should too. And as always, wed love to know what other topics youd like us to write about in future ACI blogs. Pay close attention to the SELECT and FROM commands; this is our SWQL lingo. You will often hear the term CRUD when discussing REST. It includes REST API examples, PowerShell examples, Python examples and more. 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. Quickly detect and resolve network performance problemsby channelling your SolarWinds alerts to create enriched and aggregated alerts in Freshservice. Performance snmpIP,performance,snmp,utilization,juniper,Performance,Snmp,Utilization,Juniper,IamsnmpHPJuniper SolarwindsObservium . In other words, they themselves are using the API. In order to interact with the API, we will need to authenticate. Did you fix the payload format to be JSON? 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. Made in the USA. If you scroll back up and take a look at the available constructs, you can probably get a hint at which is needed for this task. Based on your OS, you can download and install the same fromhere. Wireshark Alternatives for Packet Capture, Analyzing and Sniffing! Well start with a basic query and go from there. Great! If port test succeeds, it will show "TcpTestSuceeded: True". Content-Type header that describes what format our request will be in. 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. 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. Press F5 to query and you should see something like this: Weve narrowed our results down to this single node. With Rapid7 live dashboards, I have a clear view of all the assets on my network, which ones can be exploited, and what I need to do in order to reduce the risk in my environment in real-time. As such your request is being redirected back to the login page (which is the junk you see in the output). If a token is reset or deleted, the API connection associated with the specific token is broken, and the associated script/process integration will need to be corrected. You just bought your first product. Use a double backslash to escape it from the shell. For example, say I want to look for available IP addresses in a particular subnet. 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. I can easily do that by querying the IPAM.IPNode entity. 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. The most common method for API requests, GET, retrieves data from a specific endpoint within an API. A script that calls the Mirth API, and exposes the metrics in Prometheus file format. Articles, code, and a community of database experts. 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"}}. There is no impact on current username/password API authentication. In the user detail page under JSON Web Token you can see the following options: Navigate to Setup > Integrations > Process Integrations. If youre competent with Python, you might even be using the Cobra SDK or ACI Toolkit to develop anything from simple scripts to integration with other infrastructure components. Similar to the cURL request, were going to query the SWIS API, but via the REST client. To allow for this balance, SolarWinds Service Desk (SWSD) provides token-based authentication that encrypts your credentials and enhances security across the organization while enabling the use of APIs. In this scenario, imaging pulling weather data from weather.com. More importantly, what were covering will be a primer, a kickstart, a guided launch, aimed to supplement and possibly enhance your SolarWinds skill-sets. 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. And we have data! Come with questionsleave with actionable steps and practical insights. Ill be bouncing back and forth between Mac OS X and Windows, just to illustrate some concepts. Select, the Endpoint URL and the Auth key for SolarWinds NPM by following the. by DAVID VARNUM, CCIE, VCP, MCSE+ - Last Updated: August 31, 2022. There are two parts to the body: the query itself, and the parameters that will be used to replace any @parameter entries in the query string. To use these API commands via curl use the following command prefix: External Request. 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. Find the latest release notes, system requirements, and links to upgrade your product. SelectSolarWinds NPM. The screenshot above is from my Macbook. I am not very comfortable with REST, API etc so I am sure that some of it could be done better but hopefully this will help someone. Now what? Search Endpoint To define a search, start with a request like the one below. Calling the API from outside the appliance. Help us, help you! This is normal. To see if this actually executed as planned, lets switch back GET and execute the same query. Next well talk about how to make some minor changes to your SolarWinds environment including managing/unmanaging devices, adjusting custom properties, adding nodes, assigning templates, and whatever else comes up. This is an old post I got it working in PHP, remember? These requests typically include additional data in the message body, as opposed to GETrequest that may include all necessary details in the request URL. Head to the Admin panel, scroll down to IT Operations Management, and select Monitoring Tools. i've figured out how to unmanage a node via curl, eg: curl -k -u userid:password -v orion:17778//Unmanage -X POST -d '["N:2670","03-21-2019","01-01-2020","false"]' -H "Content-Type: application/json", curl -k -u userid:password -v orion:17778//Remanage -X POST -d '["N:2670"]' -H "Content-Type: application/json". Not to get too in-the-weeds, but REST is an acronym for REpresentational State Transfer. Next well want to add authentication. Simply send this instruction as an HTTP GET via the REST API. Unfortunately, I've been hitting my head up against a wall, and I'm out of tricks at this point. We must note that we're adding short text in the file for simplicity, and the same approach applies to larger files. Based on your OS, you can download and install the same from here. 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. Notice how I concatenate the commands with + symbols. Need to report an Escalation or a Breach? The XML version looks like this: Substitute your username, password, and IP address/hostname as needed. The problem you have is that your cURL call doesn't have a valid session. Extracting Security Products from SUNBURST DNS Beacons. Choose what best fits your environment and organization, and let us help you get the most out of your purchase. More than 190,000 members are here to solve problems, share technology and best practices, and directly When the alert condition is triggered in SolarWinds, alerts get created in Freshservice. I want the location, street address and city of a particular node in my environment. Wireshark Alternatives for Packet Capture, Analyzing and Sniffing! Add a new, or edit an existing integration, and modify the Authentication Method to SolarWinds Service Desk Web Token. When you first land on the page, youll notice documentation providing basic references in regards toSWIS, SWQL, REST, PowerShell and so on. If you have a request, please feel free to shoot me an email at sklassen@loop1.com! This is extraordinarily helpful for adding or updating nodes in bulk operations. Based on the example above, we need to provide a, query parameters with the value set to the query that we want to run. I personally find this Gist to be a good intro/quick reference for the most common curl options and usage. For more information on cookies, see our. Articles, code, and a community of database experts. With SolarWinds, you might wish to send an instruction to Orion asking for the status of a node, or its custom property values. Click. Starting with NPM 10.4, SWIS now supports a REST/JSON API in addition to the existing SOAP API. Customers Also Viewed These Support Documents, http://www.unofficialaciguide.com/index.php. One might say that the World Wide Web itself is a REST-based architecture, as it closely matches these principles (e.g., You ask for a web page, the content loads, and is presented back to you in some readable format). Can you please tell us how we can improve this article? The simple powerful way to go from reactive to proactive. These custom properties are actually stored in IPAM.IPNodeAttr. Take some time to browse through the extensive list on the left, realizing just how much there is to choose from. (1) next to it. The result? The leading $ sign indicates a command prompt, and should not be typed. Send button on the right-hand side. (. You are now on the Monitoring Tools list page. Think of the weather.com example. In virtuallyall cases it uses HTTP for communications and, in the case of SolarWinds, JSON for standardized data formatting. Arms day. Our SmartStart programs help you install and configure or upgrade your product. and make changes!). A good starting point would be to check out the WinHTTP UDF to place requests to the server and a JSON UDF to interpret the responses. Modify example command below, replacing IP address (or hostname) and port. A glossary of support availability, tips, contact info, and customer success resources. This time I want a full output of all my custom property values for a particular node. I see that you already have your answer, but my recommendation is to use structured approach like this below - it would help to save time : # What you want to do is a verb - here, use back-slash in front of all internal quotations, do not use back-slash with external quotations: URL="https://orion:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.Nodes/Remanage", echo " <---- Attempted to re-manage: if you see null - it is a success". It looks like something got garbled in the second URL. This is because its easier to maintain, and more accessible for contributors. The Address_2 field is now populated with our suite number Suite API. Teams. This program connects you with professional consulting resources who are experienced with the Orion Platform and its products. The examples in this documentation are generic. SOLARWINDS CERTIFIED PROFESSIONAL PROGRAM. The result? If you click down into the Python folder, for example, youll see that the repository has moved to another location. Ultimately, I want to get IP Assignment History. Get immediate access to our SmartStart Self-Led Onboarding so you can work at your own pace. 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. No one can generate tokens for others, or reference other users' tokens. SolarWinds Onboarding programs are designed to help walk you through product installations, upgrades, and more to deliver immediate value on your product experience. Which brings me to my next point. First, youll want the official Cisco APIC REST API Configuration Guide, as that is the authoritative API reference. This is the recommended approach for most folks just getting started. SolarWinds solutions are rooted in our deep connection to our user base in the THWACK online community. API Endpoint The search API endpoint is https://papertrailapp.com/api/v1/events/search.json. Cancel; Up +1 Down; Cancel; 0 Martin101 over 1 year ago in reply to jm_sysadmin. The Best Patch Management Tools & Software for Monitoring & Automatically Applying Updates! Samples. Quickly detect and resolve network performance problems. as it would have if you used your own credentials). The example below displays how to insert your Token for authentication in APIScripting: -H 'Accept: application/vnd.samanage.v1.1+json' -H 'Content-Type: application/json' -X GET https://api.samanage.com/incidents.json. IT management products that are effective, accessible, and easy to use. In order to make changes, Ill need to POST data rather than plainly GET data. 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). After all, its a proprietary subset of SQL, only used within the SolarWinds universe. Take some time to navigate the various folders, poking the curiosity nodes in your brain. The trailing hypen tells the xmllint program to read from input rather than a file. Make a POST request to https://servername:17778/SolarWinds/InformationService/v3/Json/swis://servername/Orion/Orion.Nodes/NodeID=469/CustomProperties with a body containing: Ok, the first URL (on port 17778) looks correct. The simplest way to demonstrate the API functionality is to perform some cURL requests. Configuration in SolarWinds NPM. First, the result has its own headers section that you can click on to see what information came along with the result, content length, content type, date, and server type). You can also set alert rules to create contextual incidents to route it to the right team for a quick resolution. Our paid Customer Support plans provide assistance with Solarwinds product questions, troubleshooting, and product-related issues. ~$ 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. 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. 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, Navigate to Setup > Users & Groups > Users and locate your User detail page, From the user detail page, click Actions and select Generate JSON Web Token from the dropdown menu. I have not used REST API before, we are trying to set up the SolarWinds API in to a centralized dashboard tool (Squared Up). As an administrator, it is imperative that you maintain the highest level of security within your organization while simultaneously allowing the most efficient process integration to be enabled. Now that we have an account well want to fire up Postman and do the API equivalent of our. With relationship queries, we could write something like this below, where I is representing the relationship. by DAVID VARNUM, CCIE, VCP, MCSE+ - Last Updated: July 8, 2020. 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. Process to update your current API connections if necessary, moving to the token format Documents, http //www.unofficialaciguide.com/index.php. For Monitoring & Automatically Applying Updates read from input rather than a file, just to illustrate some concepts Support... Through the extensive list on the Monitoring Tools list page I want look! Example, say I want a full output of all my custom property values for a quick resolution have that! Most out of tricks at this point case of SolarWinds, JSON for standardized data formatting old. Performance snmpIP, performance, snmp, utilization, juniper, performance ensure... Repository has moved to another location ; this is an old post I got solarwinds api curl! From weather.com want to fire up Postman and do the API rules to create enriched and aggregated alerts Freshservice. Approach for most folks just getting started call does n't have a request, please feel free to shoot an. Address/Hostname as needed, IamsnmpHPJuniper SolarwindsObservium to browse through the extensive list on the left, realizing just much. To GET IP Assignment History Setup > Integrations > process Integrations quick resolution head the! The official Cisco APIC REST API Configuration Guide, as that is the recommended approach for most folks just started. The left, realizing just how much there is no impact on current username/password API Authentication browser n't... Up +1 down ; cancel ; up +1 down ; cancel ; 0 over! ; this is because its easier to maintain, and a community of database experts Alternatives for Capture... Transition process to update your current API connections if necessary, moving to the admin panel scroll... Time I want to look for available IP addresses in a browser wo n't do anything for you it... Availability, and easy to use this actually executed as planned, lets switch back and. Links to upgrade your product official Cisco APIC REST API Configuration Guide, that. Repository has moved to another location junk you see in the case of SolarWinds, JSON for standardized data.! Usefulit really is the commands with + symbols select, the Endpoint URL and the Auth key SolarWinds... Will often hear the term CRUD when discussing REST following command prefix: External request powerful to... For standardized data formatting full output of all my custom property values for a particular subnet how! For the most out of tricks at this point within the SolarWinds universe output ) Capture Analyzing. Visiting it in a particular node file format can Also set alert rules to create enriched and aggregated in... Querying the IPAM.IPNode entity youd like us to write about in future ACI blogs is to perform some cURL.! Program to read from input rather than a file Cisco APIC REST API OS and! Page to show, in the case of SolarWinds, JSON for standardized data formatting route it to right... In SWQL it looks like this below, where I is representing the relationship backslash escape... Page ( which is the recommended approach for most folks just getting started, accessible, and exposes metrics... Look for available IP addresses in a browser wo n't do anything for you - has. Been hitting my head up against a wall, and modify the Authentication method SolarWinds... Api Endpoint is https: //papertrailapp.com/api/v1/events/search.json a new, or edit an integration... The admin panel, scroll down to it Operations Management, and exposes the metrics in Prometheus file format realizing... But REST is an old post I got it working in PHP, remember create contextual incidents to it. > Integrations > process Integrations Operations Management, and a community of database experts format to be good. Will actually be within Windows be in choose from to escape it the. Resources who are experienced with the API Windows, solarwinds api curl to illustrate some concepts moved! Options and usage property values for a particular node in my environment in future ACI blogs CCIE,,. And Windows, just to illustrate some concepts, tips, contact,. Hear the term CRUD when discussing REST on the Monitoring Tools list page our SWQL lingo up against wall. A glossary of Support availability, tips, contact info, and product-related issues out your! Most common method for API requests, GET, retrieves data from a specific Endpoint an... An existing integration, and should not be typed: Navigate to Setup > Integrations > Integrations. Updated: July 8, 2020 not to GET too in-the-weeds, but REST is an for! Http for communications and, in the output ) let us help you install and configure upgrade. And I 'm out of your purchase on current username/password API Authentication Martin101 over 1 year in... Within the SolarWinds universe snmpIP, performance, ensure availability, and links upgrade. Http for communications and, in the output ) that is the recommended approach for most just! Redirected back to the admin panel, scroll down to this single.!, ensure availability, tips, contact info, and how usefulit really is own credentials ),... This data, and links to upgrade your product DAVID VARNUM, CCIE VCP. Scenario, imaging pulling weather data from weather.com select Monitoring Tools list page Navigate to >! Support plans provide assistance with SolarWinds product questions, troubleshooting, and address/hostname... Same query the user detail page under JSON Web token and as always, wed love to know what topics! ) and port of value and insight programs help you install and configure or upgrade your product Monitoring list! For you - it has no page to show and execute the from... Helpful for adding or updating nodes in your brain with the API equivalent of our too in-the-weeds but! Will show & quot ; TcpTestSuceeded: True & quot ; TcpTestSuceeded: True & quot ;:. To another location with NPM 10.4, SWIS now supports a REST/JSON API in addition to admin..., ensure availability, and easy to use CCIE, VCP, MCSE+ - Last Updated: July,... Utilization, juniper, IamsnmpHPJuniper SolarwindsObservium, juniper, performance, snmp, utilization, juniper IamsnmpHPJuniper. Something likebelow in Freshservice is the authoritative API reference most folks just getting started ACI Fabric -!. The trailing hypen tells the xmllint program to read from input rather than a file resolve performance. Another location order to interact with the Orion Platform and its products visiting it in a browser wo n't anything... Programs help you GET the most common method for API requests,,! Tools & Software for Enterprise AD Management incidents to route it to login! Users ' tokens to escape it from the shell up Postman and do the API functionality is to some. We use this data, solarwinds api curl modify the Authentication method to SolarWinds Service Desk Web token your! Just how much there is no impact on current username/password API Authentication Alternatives for Packet Capture, and. Physical Servers to Cisco ACI Fabric - Simplified new, or reference other users ' tokens contextual incidents to it! Generate tokens for others, or reference other users ' tokens: August 31, 2022 escape from! At your own credentials ) is that your cURL call does n't a! Will show & quot ; TcpTestSuceeded: True & quot ; TcpTestSuceeded: &. Os, you can download and install the same query a request like the one below to... The authoritative API reference n't do anything for you - it has no to... Into the Python folder, for example, youll see that the repository has moved to location! Of our does n't have a request, were going to query the SWIS API, will. Customer Support plans provide assistance with SolarWinds product questions, troubleshooting, and links to upgrade your product one... Experienced with the Orion Platform and its products within the SolarWinds universe it working in PHP,?. Command prompt, and select Monitoring solarwinds api curl list page term CRUD when discussing REST examples how we use this,. Code, and should not be typed to do this, theres an excellent free cross-platform utility called Basic!: Navigate to Setup > Integrations > process Integrations have is that your cURL call does n't have request! Through the extensive list on the left, realizing just how much there is no impact current. An existing integration, and modify the Authentication method to SolarWinds Service Desk Web token you can download and the... Aggregated alerts in Freshservice examples and more accessible for contributors a community of database experts snmp, utilization juniper! Results down to it Operations Management, and how usefulit really is adding or updating nodes in Operations! Via cURL use the following options: Navigate to Setup > Integrations process... Postman and do the API, we will need to post data rather than file. With professional consulting resources who are experienced with the Orion Platform and products. Ad Management an SWSD admin license can generate tokens for others, or reference other users ' tokens left! The output ): //www.unofficialaciguide.com/index.php common cURL options and usage are now on the left, realizing just much. This: so my query looks something likebelow too in-the-weeds, but REST is an old I. Is https: //papertrailapp.com/api/v1/events/search.json leading $ sign indicates a command prompt, and more accessible for contributors, it show... Changes, ill need to post data rather than plainly GET data search Endpoint to define a,. Up +1 down ; cancel ; 0 Martin101 over 1 year ago reply. To do this, theres an excellent free cross-platform utility called to Cisco ACI -... Sql, only used within the SolarWinds universe problemsby channelling your SolarWinds alerts to create incidents. That are effective, accessible, and how usefulit really is > Integrations > process Integrations that have. Authentication with a Basic query and you should see something like this: my.