How does Scripted REST API PATCH Work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi,
Im currently implementing an integration between my instances but im currently lost in the scripted rest api within PUT and PATCH resource.
the error response always is this in PATCH
REST Msg Outbound - RESTMessageClient : Error executing REST request: Invalid uri 'https://dev204xxx.service-now.com/api/18xxx7x/ebonding_inbound_api/update_incident/{sys_id}': escaped absolute path not valid: Invalid uri 'https://dev204xxx.service-now.com/api/18xxx7x/ebonding_inbound_api/update_incident/{sys_id}': escaped absolute path not valid: no thrown error
but my POST resource it succeeded on my end without an error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@Ankur Bawiskar @Corey19
I finally see the updates or can update.
What i did was here
https://dev204xxx.service-now.com/api/18xxx7x/ebonding_inbound_api/update_incident
upon observing from the video you given hes using pathParams on his PATCH. And on my end i switch on making is into the request.Body instead of pathParams. and the Endpoint on my end there was a backslash on the end which causing to error the endpoint ending should be like this /update_incident on my instance it has another backslash like this /update_incident/.
If i want to use the pathParams method i should use the /update_incident/{id} (depends what call you like to use in here).
the only problem left on my end is how can i maintain the updates bi-directional since i can update now one sided both instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Refer below link for step by step instructions for bi-directional integration
ServiceNow to ServiceNow Integration using REST API and PUSH and PUT methods with Business Rule
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Ankur Bawiskar this is a table API not a Scripted Rest API. When it comes to table API im already done on this part also with Basic Authentication used. But right now im using Scripted Rest API with Oauth 2.0
Im currently on PATCH submitting one sided each but not yet bi directional but somehow close enough its updating other incidents on the Bi Directional and cannot see what i miss code somewhere between the Business Rule and Scripted Rest Resource
