Could not update record through Rest API explorer .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 02:12 AM
Hi All,
I am getting 422 service error while using PUT method on Rest API explorer for incident table.
I have the below script in Scripted REST Resource table for the API definition. What should I make changes to get 200 success response to update the record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 05:00 AM
error 422 means server can't process the request.
you are giving error if source is phone so if you are giving source as phone in your API request then it will error out
it's working as expected then what's the concern?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 06:42 AM
Thanks for your response Ankur. Actually I don't want want the 422 error. What changes should I make on that code so that i can get 200 success response ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 08:19 AM
http 200 means you should allow the update
so you need to remove the line which sets out error
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 09:46 AM - edited 03-24-2025 09:51 AM
yes, correct . I want to remove the line and allow update.
@Ankur Bawiskar could you please reply on it soon if possible ? It is quite urgent.