- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 04:51 AM
Did anyone has made rest calls by sending the request body in yaml format. If yes, can you please let me know how do i build the body and pass the parameters.
Also if we can send the body in yaml format, how do we parse the response will also comes in yaml format. Do we have parser functions built in?
Any help is appreciated.
Thank you
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 08:52 AM
Hi Nishi,
Sending data should be fine
But just to inform parsing the yaml response is not possible OOB with any OOB class
you will have to perform string manipulation to get the values from response
Regards
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-29-2020 05:08 AM
Hi Nishi,
I believe you can send the request body in Yaml format if the 3rd party expects that in that format.
But out of the box there is no parser for parsing yaml format similar to JSON parser.
Regards
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-29-2020 05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 07:30 AM
Hi,
so it looks like xml format.
any issue you are getting while consuming the endpoint?
Regards
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-29-2020 08:02 AM
Hi Ankur,
The image i have shown is XML, i have just put it for reference...
The YAML payload that i need to send to the endpoint is something like below
Phase:
Name: ”somebody”
Type: “financial”
Role: “Enhance application performance”
Date: 12/2020
Account: “accountid”
Country: ""
Number: ""
I haven't tried sending the payload...but trying to understand if we can send a yaml format data as the request body
Thank you.