Update records using REST API

XYZ
Tera Contributor

Hello Community,

 

I'm looking to update few attributes in third party application. However, I/m not able to figure out like how to make a endpoint dynamic .

 

Eg:-Below is the URL I want to use to update the case and {id} is the dynamic case .Please suggest how can I make this url dynamic, so that for every case no it generates in service now should append that case as per the URL and update the necessary attributes in third party application.

XYZ_0-1678767183688.png

 

Thanks!

 

2 REPLIES 2

kiranit396
Tera Contributor

Hi @XYZ 

 

Please define the values in where its getting triggered. lets say if business rule is triggering the REST.

 

restMessage.setStringParameter('id', current.id);
 
and Retrieve the value in REST as
 
https:://your url/${id}/updateCase
 
This should resolve your issue.

Amit Verma
Kilo Patron
Kilo Patron

Hi @XYZ 

 

While configuring the REST Message, you can make use of Variable Substitution. Please refer https://www.servicenow.com/community/developer-forum/http-query-parameters-in-outbound-rest-message/...

https://docs.servicenow.com/bundle/xanadu-api-reference/page/integrate/outbound-rest/concept/c_Varia...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.