We get this warning message while giving Accept
header in copy activity saying application/json
value will be automatically give as the value for this header.

Therefore, in copy data activity, the accepted API format is JSON
only. As an alternate, you can use web activity and copy data to get the required response in the following way.
I used a sample API which returns XML response. I used this in the web activity and the debug output would be as follows:

- The entire XML response is stored as a string. Now I have taken a copy data activity where the source is a CSV file (contents of this file don't matter. Try to take a file similar to below file).

- Now, create an additional column for this source with any column name and value as shown below:
@activity('Web1').output.Response

- Now, choose
delimited text
as the sink, with file name as op.xml
and do not choose the first row as header option. Also select quote character as No quote character
. The following is how I configured the sink dataset.

- Now in mapping import schemas and keep only the above created additional column.

- This will create a file
op.xml
at the destination storage account. The contents of the file would be as shown below:

- Now you can use another copy data activity, choose XML as a the source file format and select the above generated
op.xml
file. When I preview the data, it is showing the data as expected.

Now, you can write this file to any required file format as per your requirement.