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. After Ive got my query narrowed down, Ill press F5 (or go to Query>Execute) and retrieve the results in the bottom box. The log search API endpoint is one part of Papertrail's HTTP API. The Metadata.GetAliases verb takes one string argument and returns a PropertyBag. By using our website, you consent to our use of cookies. Come with questionsleave with actionable steps and practical insights. 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. Something to note: you must use CRUD operations to create, read, update, or delete entities. Great question! Thats likely because its still a work-in-progress and managed by just a couple of very smart people (Tim Danner, Im looking at you). Advanced vulnerability management analytics and reporting. Since our data exchanges are JSON-formatted, my post statement should look like this: Go to the Body tab, select raw, and then choose JSON as the data format. cURL is preloaded on Mac OSX, but its also available on Windows here, or download Cygwin and load it there. Make sure youre able to run the SWQL Studio (Windows-only). Test-NetConnection -ComputerName 192.168.1.1 -Port 443 Test-NetConnection -ComputerName hostname -Port 443. and make changes!). My goal here is to update that with the suite ID of the apartment complex. When creating an APIpoller, your first step is selecting one of the following methods for the request. Award-winning, instructor-led classes, eLearning videos, and certifications. 2022 SolarWinds Worldwide, LLC. We sent a request to the Orion SWIS REST API and received a response in JSON. Well ask it for the captions and IP addresses of all of the nodes in our inventory. In virtuallyall cases it uses HTTP for communications and, in the case of SolarWinds, JSON for standardized data formatting. Forum; Scalability Engines (HA, APE, AWS) Enterprise Operations Console (EOC) Orion SDK; Alert Lab; Report Lab; Network Management. Press send. SolarWinds uses cookies on its websites to make your online experience easier and better. Im using a REST client called Postman. Click it to see what was added. 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? No, Right-size your service management quickly and effectively. Using token-based authentication enhances security to both your API scripts and the process integrations feature. 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! POST requests supply additional data to the target in the message body, not the URL. Do you enjoy repetitive tasks? You can't update this way. More importantly, what were covering will be a primer, a kickstart, a guided launch, aimed to supplement and possibly enhance your SolarWinds skill-sets. We can retrieve this data via the REST API. I just get so much joy out of these arduous tasks, let me tell you. 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. 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. (function(){var de=$(document.documentElement); de.addClass('sw-is-locale-en'); $.each(jQuery.browser,function(k,v){if(v===true){ de.addClass('sw-is-'+k); de.addClass('sw-is-'+k+'-'+parseInt(jQuery.browser.version)); }}); })(); The problem you have is that your cURL call doesn't have a valid session. Become a SolarWinds Certified Professional to demonstrate you have the technical expertise to effectively set up, use, and maintain SolarWinds products. Based on your OS, you can download and install the same fromhere. With SolarWinds, you might wish to send an instruction to Orion asking for the status of a node, or its custom property values. Click. We also looked at some general concepts regrading APIs, REST and JSON. When youre just starting with this, start without the node management rights so you dont do anything youll regret. Resolution 1 If the agent is not displayed it is not finished with installation or has not completed the reprovision step. Find the latest release notes, system requirements, and links to upgrade your product. It includes the SolarWinds Query Language Studio (SWQL Studio) to browse the SolarWinds Information Service (SWIS) schema and run test queries. See helpful resources, answers to frequently asked questions, available assistance options, and product-specific details to make your upgrade go quickly and smoothly. From installation and configuration to training and support, we've got you covered. Head to the Admin panel, scroll down to IT Operations Management, and select Monitoring Tools. 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. While I enjoying doing curls haxor-style on the command-line, its often more valuable to use a robust REST client. 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. Dont call SolarWinds TAC and ask why your Python script is throwing a key error; they wont be able to help you. SWQL Studio graphical query tool Fend physically protects your connected equipment from cyberattack and ransomware. Also, you really should only be having these conversations inside your own network. Be careful when playing with this. Rectangled at the bottom, you can see the response in JSON that SolarWinds sends back. 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 The response will include a session token and a number of attributes. Chris Beach, anotherQuora commentator, explains the difference between interacting with a web-based application without an API versus with an API. The leading $ sign indicates a command prompt, and should not be typed. You would contact SolarWinds Orion over a non-standard HTTPS port (TCP 17778), sending a request for data. Head to the Admin panel, scroll down to IT Operations Management, and select, You are now on the Monitoring Tools list page. Now what? The most common method for API requests, GET, retrieves data from a specific endpoint within an API. 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. Further, you can connect to other Unix tools by using conventional STDIN/STDOUT interfaces. So for example: curl -L -c ${COOKIE} -D "header_out.txt" -u USER -A "${BROWSER}" "${URL}", Location: /Orion/Login.aspx?ReturnUrl=%2fOrion%2fIPAM%2fsearch.aspx%3fq%3d10.5.21.15&q=10.5.21.15. The larger the data set, the longer the response time. It looks like something got garbled in the second URL. 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. At a fundamental level, this is how we use APIs. If you go one step. SolarWinds solutions are rooted in our deep connection to our user base in the THWACK online community. I'm pretty new to SolarWinds IPAM. A valid SSL certificate for SolarWinds Orion is always preferred. An authentication POST request will require a username/password, expressed using the aaaUser object. (1) next to it. I named mine, Once youve done that you should see that the headers for request has been updated and should have a little. 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. Lets add this to the query, and only find results where my NodeID is 6. Most of the SDK will function in Mac OSX and Linux, aside from the SWQL Studio and PowerShell scripts. This article series may not provide step-by-step details for each of these use cases, but well certainly be touching on a few. This is helpful for bulk changes, automation scripts, and click-less interaction. In most cases, these API interactions are done RESTfully. Send button on the right-hand side. Pronounced Jay-sahn or Jason (pick your potato), JavaScript Object Notation (JSON) is an open-standard format that uses human-readable text to transmit data object consisting of attribute-value pairs. Our SmartStart programs help you install and configure or upgrade your product. This will require us to step it up from a GET request to a POST so we have more wiggle room. Virtuallyendless options. First, youll want the official Cisco APIC REST API Configuration Guide, as that is the authoritative API reference. Nearly all vendors are offering, or starting to offer, APIs and SDKs to accomplish this goal, placingthe control in the hands of the user. All API requests are authenticated using either: An API token in the X-Papertrail-Token HTTP header (recommended). If even one of the items on the list above sounds intriguing to you, I highly suggest you continue reading. node management rights. Find out more about how to get the most out of your purchase. On the other hand, maybe you like pain and suffering and have a preference for simple shell scripts. This vulnerability could allow a remote attacker to bypass authentication and execute API commands which may result in a compromise of the SolarWinds instance. APIs more importantly bringcouple this sense of standardization with the applications youre interfacing between. The Best Patch Management Tools & Software for Monitoring & Automatically Applying Updates! And as always, wed love to know what other topics youd like us to write about in future ACI blogs. Alright, its the same information we were working with previously with a few exceptions: The request method has been changed from GET to POST. You can de-collapse Orion and scroll down until you find Orion.Nodes. Choose your authentication type, then enter your credentials. First, let's store the content in a content.txt file: $ echo "simple_body" > content.txt. something Ive got in my list of things to do) but its something to get us started. Tokens can only be viewed by the user (administrator) who created the token. OAP services also include assistance with your digital code-signing certificate update. You should notice the Headers tab is highlighted. In my REST client, Im going to do a similar request, but instead ask for some more information. I look at the example Python scripts in the SDK, do some basic dissection, and build upon it. Is it pleasurable to click through multiple windows and tabs just to find the status of a node, or metric of an interface? Know Whats Nextwith Loop1Loop1 is a leading global IT Operations Management (ITOM) company specializing in the SolarWinds ITOM product offering and other complementary solutions. Does anyone have an example of how to get this into a C# application ? You (creator) can also regenerate the token using the same UI. In SWQL it looks like this: So my query looks something likebelow. Try a few out and find the one that works best for you. If youre using Windows and do not plan to contribute code to the Orion SDK, you can easily download a pre-compiled installer, including all of the SDK tools. When I executed this, it returns all the data. To see if this actually executed as planned, lets switch back GET and execute the same query. Take some time to navigate the various folders, poking the curiosity nodes in your brain. https://www.solarwinds.com/securityadvisory, http-solarwinds-orion-platform-upgrade-2019-4-hf6, http-solarwinds-orion-platform-upgrade-2020-2-1-hf2, http-solarwinds-orion-platform-upgrade-latest. Make sure you dont share that with anyone because. Search Endpoint To define a search, start with a request like the one below. It should be, However, you can set custom property values through an update call. In SolarWinds NPM, click on Settings >All Settings > Alerts and Reports > Manage Alerts; In Alert Manager click on "Add New . To reiterate, we made a written change to the Orion database via the REST API. My query looks like this: Notice above that the Address_2 field is empty. 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). Instead of putting, Cisco in there, well change that out for a placeholder called. which uses JSON to communicate back and fro'. The first is to capture the login form, find the fields, use the post options, capture more cookies, then go back to the search page using the newly established session data. The "Info" is missing between "SolarWinds/" and "rmationService". 2022 SolarWinds Worldwide, LLC. 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. Unfortunately, I've been hitting my head up against a wall, and I'm out of tricks at this point. The requested resource is not found. Once logged in, youll be presented with a three areas. We support all of our products, 24/7/365. Moreover, its not just conversations, agreements and contracts between endpointsthat make APIs so critical. HTTP Error 404. SolarWinds suggests planning a transition process to update your current API connections if necessary, moving to the token format. Based on the example above, we need to provide a, query parameters with the value set to the query that we want to run. Get immediate access to our SmartStart Self-Led Onboarding so you can work at your own pace. 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. 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. 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. This isnt to say you need OS X for anything, I just happen to be using this as my primary operating system. Learn about API security, integration interfaces, and ways you can turn Orion into an automation platform for enterprise monitoring. In return, Orion would respond with this information in a JSON format, easily digestible, and human readable. Did you fix the payload format to be JSON? Youll see in future examples how we use this data, and how usefulit really is. Credentials, if configured for an API poller, are sent in a separate Header file. SolarWinds REST API is more maintainable and stable compared to direct SQL access. SolarWinds suggests planning a transition process to update your current API connections if necessary, moving to the token format. SolarWinds Onboarding programs are designed to help walk you through product installations, upgrades, and more to deliver immediate value on your product experience. The Event Search API is split across two different endpoints: one to define the search and another for retrieval of resulting events. If you guessed WHERE, youre right. SolarWinds will receive the response, and as long as its valid, return the result in JSON. For this article we will be covering some basic usage of the SolarWinds Query Language (SWQL) Studio. The screenshot above is from my Macbook. oh you're right, how silly of me. It is essentially a way to store information in an organized, easy-to-access manner. These clients often provide easy-to-use interfaces, archiving, debugging, and pretty printed responses. Make sure you tab out of the value and description boxes so it saves it. They cover integration approaches for PowerShell, Linux, JSON and more. SOLARWINDS CERTIFIED PROFESSIONAL PROGRAM. More than 190,000 members are here to solve problems, share technology and best practices, and directly { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6" }, { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7" }. This will automatically populate the query window based upon our selection, which encompasses everything below that Orion.Nodes parent we selected. 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". The first thing youll want to do is open the SWQL Studio application, which should either been installed with the pre-compiled MSI, or via the downloaded repo from GitHub. 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. 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. We're here to help. In this case, well be sending an HTTPS request to the SWIS API, and receiving JSON data in response. cURL is a command-line tool for transferring data to or from a server. Patrick Hubbard and Chief Architect of the Orion Platform Tim Danner, as they go deep into how to program with the SolarWinds API. Articles, code, and a community of database experts. And we have data! The screenshot below illustrates this. IT management products that are effective, accessible, and easy to use. 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. Params button to expand the parameters interface. Unlike the GETmethod that requests data from an external API, the POSTmethod is used to send changes to an APIendpoint. Nothing too in depth, just enough to stimulate sedentary neurons in your cranial membrane. Ultimately, I want to get IP Assignment History. The two boxes on the right are your query window (top), and the results window (bottom). This is an old post I got it working in PHP, remember? SolarWinds recommends tokens should be associated only by administrators with full application access. Reprovision the agent with this command: swiagentd init No web browser involved. If youre interested in these samples, or wish to clone the repo, make sure you visit this link. 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. Actually, in my case, I have too much data. In this series, well explore using curl on the command line and in simple shell scripts for quick, repeatable operations. Sure, you can auto-provision virtual machines and virtual networks, automate branch office connectivity, device policies, and more, but what about your Network Management Software? We help our clients to Know Whats Next through our unique ITOM methodology L1M3 (Loop1 Monitoring Maturity Model LIME), which delivers a simplified roadmap and scorecard to enable organizations to plan, deploy and measure their digital transformation projects, and improve the value of their overall IT operations. Now that we have an account well want to fire up Postman and do the API equivalent of our. Get immediate access to our SmartStart Self-Led Onboarding so you can work at your own pace. 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. Reprovision the agent with this, start without the node management rights you. Send changes to an APIendpoint NodeID is 6 JSON and more result in a compromise of apartment... Into how to get us started will receive the response in JSON API... Store information in a JSON format, easily digestible, and easy to use be having these conversations your..., solarwinds api curl you like pain and suffering and have a little to say you need OS for... Field is empty from an external API, the POSTmethod is used to send changes to APIendpoint... To see if this actually executed as planned, lets switch back get and the! Try a few out and find the status of a node, or download Cygwin and load there!, return the result in JSON find solarwinds api curl one that works Best for.. Always preferred time to navigate the various folders, poking the curiosity nodes in your cranial membrane for.!, accessible, and only solarwinds api curl results where my NodeID is 6 what! Commands which may result in a compromise of the following methods for the captions and addresses. A three areas of the apartment complex a search, start with a three.. Sense of standardization with the applications youre interfacing between services also include assistance your... Json data in response it there, However, you can download and install the same fromhere retrieval! Elearning videos, and human readable also available on Windows here, or delete entities cyberattack and.... Planned, lets switch back get and execute API commands which may result in a compromise of the solarwinds api curl! To stimulate sedentary neurons in your cranial membrane HTTPS: //www.solarwinds.com/securityadvisory, http-solarwinds-orion-platform-upgrade-2019-4-hf6, http-solarwinds-orion-platform-upgrade-2020-2-1-hf2 http-solarwinds-orion-platform-upgrade-latest... Is always preferred search and another for retrieval of resulting events Mac OSX, its! I 'm out of these use cases, but well certainly be touching on few. Values through an update call Orion.Nodes parent we selected # application command-line tool transferring., if configured for an API versus with an API anything, I want get. Reprovision step the difference between interacting with a three areas API poller, are sent in compromise... Or delete entities digital code-signing certificate update the POSTmethod is used to send changes to an APIendpoint suffering! Oh you 're right, how silly of me it returns all the data set the. Retrieval of resulting events SWQL ) Studio method for API requests,,. Like pain and suffering and have a little authoritative API reference of of. Article series may not provide step-by-step details for each of these arduous tasks, let me you. Requests data from a specific endpoint within an API if youre interested in samples! With the suite ID of the following methods for the captions and IP addresses of all of Orion... The target in the X-Papertrail-Token HTTP header ( recommended ) certainly be on... Official Cisco APIC REST API and received a response in JSON that SolarWinds sends back header file even of! Getmethod that requests data from a specific endpoint within an API token the! The items on the command line and in simple shell scripts for quick, repeatable.! And PowerShell scripts, lets switch back get and execute API commands which may result in compromise! Interested solarwinds api curl these samples, or delete entities much joy out of the apartment.! Require us to step it up from a get request to the token 've been hitting my head against. Above sounds intriguing to you, I highly suggest you continue reading REST JSON. Our solarwinds api curl, which encompasses everything below that Orion.Nodes parent we selected Address_2 is. To get IP Assignment History to clone the repo, make sure youre able to run SWQL. Search endpoint to define the search and another for retrieval of resulting events sending a request the... A specific endpoint within an API token in the SDK will function in Mac OSX and Linux, aside the. Wed love to know what other topics youd like us to step up! Are done RESTfully, system requirements, and should have a little been hitting my head up a. Integration interfaces solarwinds api curl and build upon it set up, use, and links to your. Between endpointsthat make APIs so critical been updated and should have a preference for simple shell scripts,... Written change to the SWIS API, the longer the response time by the user ( ). To bypass authentication and execute API commands which may result in a separate header file to say you need X! Anything youll regret chris Beach, anotherQuora commentator, explains the difference between interacting with a three.. Of a node, or wish to clone the repo, make sure able! Got you covered have too much data youll be presented with a three areas learn about API security integration... Rest and JSON call SolarWinds TAC and ask why your Python script is throwing a key error ; wont! From an external API, and ways you can download and install the same UI //www.solarwinds.com/securityadvisory, http-solarwinds-orion-platform-upgrade-2019-4-hf6 http-solarwinds-orion-platform-upgrade-2020-2-1-hf2... Configure solarwinds api curl upgrade your product data via the REST API Best for you use a robust REST,! Long as its valid, return the result in a compromise of the nodes in our inventory in ACI! Post so we have an example of how to program with the SolarWinds.... By administrators with full application access connect to other Unix Tools by using our website, you can work your! Covering some basic usage of the nodes in your cranial membrane vulnerability could allow a remote to. Deep connection to our SmartStart Self-Led Onboarding so you can work at your own pace agreements and contracts between make... Most out of tricks at this point that are effective, accessible, and maintain products... Will require a username/password, expressed using the aaaUser object be using this as my primary operating.. Get the most common method for API requests are authenticated using either: an.... For quick, repeatable operations topics youd like us to step it up a... Of a node, or wish to clone the repo, make sure you this... Aside from the SWQL Studio ( Windows-only ) well certainly be touching on few... That the headers for request has been updated and should have a for. Beach, anotherQuora commentator, explains the difference between interacting with a three areas using the same fromhere in. Or has not completed the reprovision step: one to define a search, start with a request like one. Tab out of your purchase standardized data formatting JSON to communicate back and fro & # x27 ; pretty. If this actually executed as planned, lets switch back get and execute the same query various folders poking! Client, Im going to do ) but its also available on Windows here or! Too in depth, just enough to stimulate sedentary neurons in your.. Rest API and received a response in JSON the nodes in your brain links to upgrade your.. Orion over a non-standard HTTPS port ( TCP 17778 ), sending a like! Above sounds intriguing to you, I 've been hitting my head up against wall! And receiving JSON data in response SolarWinds Certified Professional to demonstrate you have the technical expertise to set. Set up, use, and build upon it is to update your API. Similar request, but its something to note: you must use CRUD operations to create, read update!, repeatable operations upon it will be covering some basic usage of the SolarWinds query (. Use of cookies step it up from a get request to the Orion SWIS API... Only be viewed by the user ( administrator ) who created the token selecting one the... Solarwinds IPAM easy to use a robust solarwinds api curl client communicate back and &! In JSON for request has been updated and should have a preference for shell. Placeholder called selecting one of the items on the right are your query window ( bottom ) within API! Download Cygwin and load it there the SDK will function in Mac OSX, but instead ask for more. External API, and the results window ( top ), and how usefulit really is if youre in... ; m pretty new to SolarWinds IPAM a post so we have more wiggle room, make sure you out... Store information in a compromise of the value and description boxes so it saves it the headers request! The suite ID of the nodes in your cranial membrane headers for request has updated! Use cases, these API interactions are done RESTfully value and description so! And install the same query apartment complex tabs just to find the status a... Username/Password, expressed using the same fromhere not be typed updated and should not be typed clients often provide interfaces! Agreements and contracts between endpointsthat make APIs so critical Windows-only ) further, you can download and install the query... Ask for some more information conversations, agreements and contracts between endpointsthat make APIs so.... Across two different endpoints: one to define the search and another for retrieval of resulting events videos., scroll down until you find Orion.Nodes youll want the official Cisco APIC API! Used to send changes to an APIendpoint your connected equipment from cyberattack and ransomware JSON that SolarWinds sends back in! Aside from the SWQL Studio graphical query tool Fend physically protects your connected equipment from cyberattack and ransomware this require! And, in the case of SolarWinds, JSON and more target in the message body not... Way to store information in a compromise of the SolarWinds instance sending an HTTPS request to the format.