FLRTing with JSON
No, it’s not the latest gossip from the local high school; it is the exciting news that our Fix Level Recommendation Tool (FLRT) now supports JSON (JavaScript Object Notation) format for our primary functions. JSON has rapidly overtaken XML as a common format for exchanging information between web applications. Numerous JavaScript-based platforms like Node.js, Node-RED, AngularJS and others have made JSON data formats a staple of modern web development. Now, accessing JSON data from FLRT is just as easy. This blog will review the primary functions in FLRT where JSON is enabled and provide examples of using this data. What FLRT functions return JSON data?Numerous FLRT functions can return JSON data. Here are some examples and when you might want to use them:
How to get JSON dataThere are two primary ways to access JSON data for FLRT functions: Using the FLRT website, run a report as you normally would, specifying the data applicable to your system. When the report runs, click the JSON button at the top of the report to view the information in JSON format. However, who is really going to read JSON in this manner? As you know, it is designed to be read by an application. The more practical application of using JSON data in FLRT is to access the FLRT report programmatically. We recently blogged about all the ways you can access FLRT programmatically. You simply need to specify JSON format as your return format. You can use these methods together by first “discovering” the FLRT URL you want to use as a base by navigating the website the website and then using the programmatic functions to alter the URL and pull data. Here’s an example:
For example, my URL is http
http report?pageNm=home – specifies we are running a report from the home page &reportType=power – report type &pla &p0.fw=SV860_103 – system firmware for host system &p0.hmc=V8+R860 – HMC version for host system &p1. &p1. &format=json – Format to return Additional examples of various URLs and product codes can be found on the FLRT blog and the FLRT product codes page. JSON examplesNow that you have the JSON data, how can you parse it? Every JavaScript platform has a variety of ways to parse JSON format. Many other programming languages have similar functions as well. The examples below provide a guide to access the data, but you will need to parse the data according to the specifications of the programming model you are using.
Power Systems RecommendationsBase element: flrtReport contains array of partitions Array element 0 is always the “System” partition, base element System, can contain the following elements (depending on what you provide):
Array elements 1 through 254 can be the logical partitions you specify. Each partition can include the operating systems and software. Recommendations: Each section that provides recommendations has the following format:
Variations from this pattern:
FLRT Lite data tablesBase element: results contains an array of values Each value element contains the same data in the FLRT lite tables including:
Variations from this pattern: The Systems Storage FLRT lite data table contains these elements:
Updates to JSON formatsPlease be aware that the FLRT team continually tries to improve the format and usability of our reports responding to customer feedback. That means that the structure and content of these reports may change occasionally. The FLRT team will strive to keep the same format as much as possible to ensure compatibility with existing applications that use FLRT data, but the format may change, new elements may be added, or existing elements may be relabeled or reorganized. The FLRT team will post updates when such changes are made, but it is a best practice to regularly check your running scripts or applications for parsing errors. FeedbackAs always, we value your feedback! Please use our feedback tool to submit a feature request, bug report, or suggestion directly to the developers at: ibm. You may also follow us on Twitter @IBM_FLRT for the latest updates. The FLRT and FLRTVC teamJohn Goodson is an IT Architect for Electronic Support in Austin, TX. John has designed numerous support sites in his 17 years at IBM including the IBM Support Portal and IBM Call Home Web. Joel Ruiz is an IBM Electronic Support developer in Austin, TX. He developed FLRTVC and the FLRT Beta website, and welcomes your feedback. Morgan Tong joined IBM in 1998. During his 17+ years with IBM, he has worked in many of the IBM divisions and product teams as a software engineer. Ron Theriault is the primary developer of FLRT and some other support tools. He has spent many years in academia, developing software on various Unix/Posix platforms, and has been using Java since 1995. Laurie Kruger is a project manager with IBM Electronic Support. She monitors several IBM Electronic Support twitter accounts and various feedback mechanisms and looks forward to your input. |