How to access REST services
The preceding sections in the chapter cover the list of URIs exposed by YARN. In this section, you will learn about three different ways to fetch data from these services:
- REST client plugins
- Curl command
- Java API
RESTClient plugins
You can use plugins available for different web browsers to fetch data from YARN REST services. The RESTClient
plugin can be used in Firefox. To install or read more about the plugin, refer to https://addons.mozilla.org/en-us/firefox/addon/restclient/:
Following are the steps to use RESTClient in Firefox:
- After successful installation, open the RESTClient page in your Firefox browser. The page contains a menu section and a request section:
- From the menu section, add a Custom Header to the request:
- Enter
Accept
andapplication/json
in the Name and Value fields of the header, respectively. If you need the response as XML data, then specify the value of theAccept
header asapplication/xml
: - Specify request URI: In the request section, choose...