Has anyone used the REST "DELETE' method for outbound REST Messaging?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 06:46 AM
The field 'Content' was not visible on the form but I updated the UI Policy to show the content so i can use the JSON body. However, when I tried to test my DELETE method and hardcoding the values on my JSON body I get an error:
{"errors":{"":["A non-empty request body is required."]},"title":"One or more validation errors occurred.","status":400,"traceId":"|f7ba0e33b142d84a91d2e7f57a7cafb5.40b1f8fb_"}.
If I run my DELETE in Postman it works.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 06:50 AM
Check this out:
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 07:16 AM
Thank you for this link. The example they provided uses the DELETE method to delete a record from a ServiceNow instance. However, my 3rd party requires I pass a JSON body like below:
endpoint: https://userapi-company_name.net/api/support/user/adjuster/{userId}
{ "userId": 0, "bugTicket": "string", "updateByUserName": "string" }
But when you try to create a DELETE method, the content is hidden on the form. I changed the UI Policy to always display the content. When I input the content and values and test. I get that error mentioned above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 07:20 AM
Hi Ricky,
So you are trying to consume 3rd party application using DELETE method and it works from Postman but not working from outbound Rest message in ServiceNow?
Can you share the script where you are setting the userId variable and sending the json body as the one you required to send?
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 08:03 AM