Skip to content

Instantly share code, notes, and snippets.

@nithesh1992
Created May 2, 2017 07:27
Show Gist options
  • Select an option

  • Save nithesh1992/532fdeab2c1bc57e87c6b2828dde2346 to your computer and use it in GitHub Desktop.

Select an option

Save nithesh1992/532fdeab2c1bc57e87c6b2828dde2346 to your computer and use it in GitHub Desktop.
Informatica Cloud REST Class
public with sharing class AccountUpdateIntegration {
@future (callout=true)
public static void runjob(String username, String password, String jobName, String jobType) {
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();
req.setEndpoint('https://app.informaticaondemand.com/saas/api/1/runjob?username='+EncodingUtil.urlEncode(username, 'UTF-8')+
'&password='+EncodingUtil.urlEncode(password, 'UTF-8')+
'&jobName='+EncodingUtil.urlEncode(jobName, 'UTF-8')+
'&jobType='+EncodingUtil.urlEncode(jobType, 'UTF-8'));
req.setMethod('POST');
try
{
res = http.send(req);
}
catch(System.CalloutException e)
{
System.debug('Job Error: '+ e);
System.debug(res.toString());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment