API test CORS access Undefined error

I am trying to test out an API in appgyver but it keeps throwing error asking to check CORS access. I would like to know how to resolve it or can we disable the api call from validating CORS. Please find the below screenshots for the same.

Error in Get Collection (GET) Screenshot:

Hi,

Here is the relevant information:

Thank you Kirill for the response. We were able to resolve the CORS issue. I am new to REST API integration and would like to know how could I extract JSON string from the given API response. Please find below the API response:

[{“EDPNo”:“12345”,“OfficerName”:“Aditya Dabholkar”,“OfficerCode”:“”,“BaseLocation”:“MUMBAI”,“Officer_Band”:“M8”,“Officer_Role”:“O”,“Region”:“HO”,“Manager”:“12345”,“MEDPNO”:“123456”,“MName”:“HEMASHREE S",“LoginHQ”:“MUMBAI”,“Taluka”:“MUMBAI”,“DistrictId”:“DMUM”,“District”:“MUMBAI”,“State”:“MAHARASHTRA”,“StateId”:“018”,“GCMID”:“”,“PSArea”:“GA06”,“EmailId”:"XYZ@GMAIL.COM,“ContactNo”:“1234567890”,“FromSOrg”:“”,“VendorNo”:“”,“CostCenter”:“”,“AccountFlag”:false,“MEmail”:"abc@gmail.com",“Officer_Designation”:“Officer”}]

While passing the URL, this is the error I get under Get Collection (GET):

Hi,

Your JSON response is not valid, hence cannot be processed by Composer. You can use a JSON validator to verify that:

Hi Kirill,

Thank you for the response. I also tried validating the JSON but it was showing it is valid. Below is the JSON input for your reference.

[{
“EDPNo”: “12345”,
“OfficerName”: “Aditya Dabholkar”,
“OfficerCode”: “”,
“BaseLocation”: “MUMBAI”,
“Officer_Band”: “M8”,
“Officer_Role”: “O”,
“Region”: “HO”,
“Manager”: “708484”,
“MEDPNO”: “708484”,
“MName”: “HEMASHREE S”,
“LoginHQ”: “MUMBAI”,
“Taluka”: “MUMBAI”,
“DistrictId”: “DMUM”,
“District”: “MUMBAI”,
“State”: “MAHARASHTRA”,
“StateId”: “018”,
“GCMID”: “”,
“PSArea”: “GA06”,
“EmailId”: “ADITYA.DABHOLKAR@GODREJAGROVET.COM”,
“ContactNo”: “8976540037”,
“FromSOrg”: “6104”,
“VendorNo”: “0000712725”,
“CostCenter”: “P700251”,
“AccountFlag”: false,
“MEmail”: “hemashri.sanyashiv@godrejagrovet.com”,
“Officer_Designation”: “Officer”
}]

Could you please try this as well? This is the same format JSON but with different values.

Thanks and Regards

Hi,

I am afraid that the provided JSON response is still invalid. As you can see below, a valid JSON response, similar, to yours works just fine:

Hi Kirill,

I am able to get data from the API calls now but only through GET Record and not through GET Collection. I think it is because the API response sends additional output which is not JSON. Please find the attached example for reference.

Can you please tell me how to extract JSON string from the given exemple in AppGyver?

Thanks and Regards

Hi,

Your API response is in XML format, which is not currently supported. You would need your destination to return a JSON response.
See here: