Data in XML in postman

how i get data in XML format

i tried this

https://people.zoho.com/people/api/attendance/getUserReport?authtoken=removed&sdate=01-Jan-2019 &edate=31-Oct-2019&empId=51

but unable to get data in xml

Hi @bakhtawarashiqhussai,

I am not sure how we can help with what you are experiencing, because this looks like a server side issue.

When I follow the request, I do get json back. Could you try adding a header to your request, using

Accept: application/xml

That should tell the server that you want to get back XML, as opposed to JSON, which looks like the default. However, this will only work if the server supports an xml response.

Additionally, on a security side, be sure to change your authtoken once you are done troubleshooting, especially so as to not expose any potentially sensitive information.

Hope this helps!

β€” Orest

already this is mentioned

@bakhtawarashiqhussai a quick look at the Zoho API indicates that they may be be deciding the output format using input data format.
Attendance API doesn’t mention about XML I/O - https://www.zoho.com/people/help/api/attendance-api.html
But a few other endpoints like this one shows how to pass XML Data as input https://www.zoho.com/people/help/api/leave-api.html and the response is in XML.

For more details reach out to Zoho as they can provide more details and confirm this behaviour: https://help.zoho.com/portal/home ( https://help.zoho.com/portal/newticket )

I would agree with @amit , their documentation or support would be your best bet.

Additionally, Content-Type generally defines the data format of the request body, and not what data format to return in the response. The Accept header tells the server what data format you want to receive the response body to be, and will (should) do so if supported by the server. However, this may not be always the case, as it depends on how the developers created the API.

Best of luck.

β€” Orest

1 Like

yes when i try leaves API then works fine but when i try attendance API this shows an error