how can we automate the connection alias setup in REST Step of flow designer for different envirnmt.

Abhi53
Tera Contributor

how can we automate the connection/credential alias setup in REST Step of flow designer for different environments so that it will auto update as per the instance i.e. dev, test & prod .it will be useful in case of code migration from one instance to another so that the connection alias & base url in REST step will auto update as pr the instance .

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Abhi53 

connection/credential alias are not captured in update set.

You will have to migrate them via export/import XML

Since the sysIds will be the same the flow REST Step will automatically get associated with the connection record.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

VikMach
Mega Sage

@Abhi53, you can use toggle script button and update the base URL as snip below.

VikMach_0-1759223970736.png


Hope this helps.
Let me know if that worked.

Regards,
Vikas K

Abhi53
Tera Contributor

Thanks for your kind response.

so i do need to store all the instance URLs in system properties ?please share details..

@Abhi53, you don't have to store instance URL in the properties.
That method will auto pick the instance ID. There is another method that picks the base URL automatically. See the snip below and run in your instance or PDI to understand how it works.

gs.getProperty('glide.servlet.uri') - This method will auto pick the base URL of the instance. For example see snip below. 

 

VikMach_0-1759241321341.png

 



Regards,
Vikas K