I am trying to get records from contact table using WEB API in PowerApps Portal. I am able to Call API/get records with Trial Portal but when I tried to call same API with our client Portal then I get 404 error.
Here is request I am using.
var fetchXmlQuery = `
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="contact">
<attribute name="lastname" />
<attribute name="contactid" />
</entity>
</fetch>`;
var req = new XMLHttpRequest();
req.open("GET", "https://testportaltrial.powerappsportals.com/_api/data/v9.0/contacts?fetchXml=" +encodeURIComponent(fetchXmlQuery), true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.send();
I have configured Site settings:
- Name: Webapi/contact/enabled Value: True
- Name: Webapi/contact/fields Value: *
and also added table permissions for contact table with global access type.
Here is the response of request:
error:
code: "9004010C"
inner error:
code: "9004010C"
message: "Resource not found for the segment {0}."
type: "Resource Does Not Exists"
message: "Resource not found for the segment {0}.
I am also able to retrieve records using fetch liquid tags but not using Web API in our client portal.
Client Portal Version : 9.3.11.19
