+ Start a Discussion
sonam gupthasonam guptha 

get redshift data and display it on visual force page

Hello,

Here iam trying to display the redshift data on visualforce page.

i hope we have to write an api which will get the data from redshift and then we need to display it using visual force page.
But here i have to show different data in three different tabs.
And other thing i have to show the data on daily basis

for example someone wants look into some ‘X’ Account info on the visual force page then they need to search by using with name of X.
How can i search that account on visualforce page and is it possible to get that data?

Then it has to give the result of that particular account in detail and on daily basis
can any one help me out to resolve it.
public class consolewrap {

public String Name{get;set;}

public String AccNumber{get;set;}

public String Source{get;set;}

public String Site{get;set;}

public String Email{get;set;}

}
 
<apex:page controller="calloutcontroller" title="JSON table" >

<apex:form >

<apex:pageBlock >

<apex:pageBlockTable value="{!performcallout}" var="wrap" width="100%">

<apex:column headerValue="Name" value="{!wrap.Name}"/>

<apex:column headerValue="AccountNumber" value="{!wrap.AccNumber}"/>

<apex:column headerValue="Source" value="{!wrap.Source}"/>

<apex:column headerValue="Website" value="{!wrap.Site}"/>

<apex:column headerValue="Email" value="{!wrap.Email}"/>

</apex:pageBlockTable>

</apex:pageBlock>

</apex:form>

</apex:page>
public class Calloutcontroller {

public List<consolewrap> ConsoleWrapperList{get;set;}

public List<consolewrap> getperformcallout(){

ConsoleWrapperList = new List<consolewrap>();

HttpRequest req = new HttpRequest();

HttpResponse res = new HttpResponse();

Http http = new Http();

req.setEndpoint('https://redshiftURL');

req.setMethod('GET');

res = http.send(req);

if(res.getstatusCode() == 200 && res.getbody() != null){

ConsoleWrapperList=(List<consolewrap>)json.deserialize(res.getbody(),List<consolewrap>.class);

}

return consolewrapperlist;

}

}
settedup remote site settings even 
 But here iam getting below error :--
System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 403 Forbidden" 
Class.Calloutcontroller.getperformcallout: line 10, column 1