public static JSONArray getData(int fromIndex){
		   StringBuilder sb = new StringBuilder(serverUrl).append("json").append("/Leads/").append("getRecords");
		   JSONArray data = new JSONArray();
           try{
        	   URIBuilder uri = new URIBuilder(sb.toString());
        	   uri.setQuery("authtoken");
        	   uri.setParameter("authtoken", authtoken);
        	   uri.setParameter("scope", "crmapi");
        	   uri.addParameter("fromIndex",""+fromIndex);
        	   uri.addParameter("toIndex", ""+200);
        	   uri.build();
        	   URL url = new URL(uri.toString());
        	   URLConnection con = url.openConnection();
        	   con.connect();
        	   BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream()));
        	   String line;
        	   while((line = br.readLine())!=null){
        		   data.put(line);
        	   }
           }catch(Exception e){
        	   e.printStackTrace();
           }
           return data;
		
	}