- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2018 06:23 AM
I want to pass EndPoint dynamically,
Like I am able to pass parameters via using ${} But I want the server name dynamically too.
Here ${subid} passes value perfectly
But Servername ${rest_endpoint} wont working.
I have declared this value in Script include
var subid = "**********";
var rest_endpoint = "**********";
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2018 08:44 AM
Hi,
You have to pass something like this in ur script include to make it work in REST
Below is the example of JIRA
r.setStringParameter('base_endpoint', gs.getProperty('com.snc.integration.jira.base_jira_instance_url'));
Mark my ANSWER as CORRECT and HELPFUL if it helped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2018 12:29 AM
use directly
below is the sample code if you wanna have a look
createIssue : function( issue ){
var json = new JSON();
var body = json.encode(issue);
var r = new RESTMessage('Jira Issue', 'post');
r.setBasicAuth(gs.getProperty('com.snc.integration.jira.jira_api_user'), gs.getProperty('com.snc.integration.jira.jira_api_password'));
this.debug("BODY to be Submitted: \n" + body);
r.setXMLParameter('issuebody', body);
r.setStringParameter('base_endpoint', gs.getProperty('com.snc.integration.jira.base_jira_instance_url'));
var res = this._submitBodyTypeRequest(r, true);
return res;
},
Mark my ANSWER as CORRECT and HELPFUL if it helped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2018 09:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 11:25 AM
If i need to send additional comments / worknotes string value then what should i add script line in BR.
Please suggest me.
Thanks in an advance