API response to be in XML

Hi,

I was looking for API mocking solution and came across dreamfactory. I am done with the installation and its up and running working without any issue. The APIs are currently pre-configured for my sql in API Docs section are returning response only in JSON. How could I configure these APIs to either provide only XML response or both XML and JSON.

Also, these APIs requires authentication. How could authentication be disabled.

Please excuse if these question sound too basic. I am new this and I already tried searching in google and available doc, community posts etc but couldn’t find the answer.

Regards
Amit

Hello @amit_btb ,

To receive an xml, you should use the url parameter or header: Accept
https://wiki.dreamfactory.com/DreamFactory/API#Response_Format

To allow access without authentication, you must define a Default Role
https://wiki.dreamfactory.com/DreamFactory/Tutorials/Setting_up_application_default_role

Best Regards,

1 Like

Hi, thanks a lot for your reply. I could do things following the links you shared.

What other Accept parameters will work in the api url? Besides JSON and XML, the only other one I’ve noticed to work is “accept=text/csv” for csv.