Java Sample – GetRestAPIVersionsInfo.java for Oracle Profitability and Cost Management Cloud

Prerequisites: json.jar

Prerequisites: See Oracle Profitability and Cost Management Cloud Common Helper Functions for Java

     public void getRestAPIVersionsInfo() throws Exception {        
        String urlString = String.format("%s/epm/rest", serverUrl);
        String response = executeRequest(urlString, "GET", null, "application/json");
        System.out.println("Response String : " + response);
        JSONObject jsonObj = new JSONObject(response);
        JSONArray itemsArray = jsonObj.getJSONArray("items");        
        System.out.println("Details : " + itemsArray.toString());
    }