Created
May 2, 2017 07:27
-
-
Save nithesh1992/532fdeab2c1bc57e87c6b2828dde2346 to your computer and use it in GitHub Desktop.
Informatica Cloud REST Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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