Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-11-25 05:58 AM
I am just practicing to call REST APIs using XML values. I have tried to create a Contacts record using REST API and XML request in Archer API Template application. Its throwing 400 bad request. Default JSON input worked successfully.
The XML Input:
<?xml version="1.0" encoding="UTF-8" ?>
<Content>
<LevelId>37</LevelId>
<Tag>Contacts</Tag>
<FieldContents>
<531>
<Type>1</Type>
<Tag>First Name</Tag>
<Value>User1</Value>
<FieldId>531</FieldId>
</531>
<543>
<Type>1</Type>
<Tag>Last Name</Tag>
<Value>Test</Value>
<FieldId>543</FieldId>
</543>
</FieldContents>
</Content>
Does Archer REST APIs accept XML String as an input? If yes, do we have any material on how to create input xml string for rest apis?
Also, in POSTMAN, i tried to read a Contacts record using Content Type as "text/xml; charset=utf-8". But i am getting the same JSON results. But i want the result in XML. What am i doing wrong?
2019-11-25 07:37 AM
Also, in POSTMAN, i tried to read a Contacts record using Content Type as "text/xml; charset=utf-8". But i am getting the same JSON results. But i want the result in XML. What am i doing wrong?
Did you try changing the "Accept" header to "application/xml"?
2019-11-25 07:47 AM
Yes, my Acccept header is "[{"key":"Accept","value":"application/json,text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","description":""}]".
2019-11-25 08:18 AM
Can you try by just passing "application/xml" alone in the request header?
2021-06-15 10:53 AM
What Archer API template application are you referring to?
2021-06-15 10:59 AM
@RobWilder, this is what was referenced, Archer API Templates - an Archer application to quickly test the Archer Web Services API, REST API, ... - RSA Link - 566337
Advisory Consultant