How to dynamically set the Authenticate key in the http header of rest Message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 03:39 AM
Hello all,
We are implementing an integration using REST Api ,and in that we are having the same end point but different Authentication Keys for different region,so how can we set them dynamically so that it load all the data from 2 regions.
Currently in one method we are generating organization there i have tried to use both the value but its giving me the organization whose key i have mentioned in the Parent Rest Message.
SO how can i achieve this ?
Help from anyone would be appreciated.
Regards,
Riya
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 03:57 AM
Hi Riya,
Check point no.7 below.
- Navigate to System Web Services > REST Message.
- Select a REST message.
- (Optional) To specify a header for an HTTP method instead of the REST message, in the HTTP Method related list, select an HTTP method.
- Select the HTTP Request tab.
- In the HTTP Headers embedded list, click Insert a new row.
- Enter the name of the header, such as Content-Type or Accept.
Supported headers depend on the REST web service provider you want to connect to. Refer to the documentation for your web service provider to identify which headers are valid or required.
- Click on the Value field for the new row and enter the value you want to assign this header.
You can use a variable in the format ${variable} instead of a static value. You can assign a value to the variable when sending a REST request.
- Click Update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 04:59 AM
Hello Nikhil,
Where we can assign the value to the variable?
Cann you please explain it with an example?
Also i have another method which uses the id returned by the above method to list the devices ,how can i pass those ids dynamically?
I have tries adding in the test values under Variable Substitutions but its not working?
Thanks and regards,
Riya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 06:12 AM
Hello Nikhil,
I have added this code in the script which is included in the Scheduled JOb.
But when i am testing this method by setting value as ${token},its failing.
Also need to ask for the other method which included id in the endpoint :id we are getting through Organization method ,earlier for 1 rganization i have included in varaiable substitution but for 2 organozation should i follow the same process as above?
Thank you for the help.
Regards,
Riya