cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

How to retrieve records by Portal Web Api?

I have a custom entity and have given permission through portal manager. Now I want to retrieve record from that custom entity using web api like following:

 

webapi.safeAjax({
        type: "GET",
        url: "/_api/custom_configurations",
        contentType: "application/json",
        success: function (res, status, xhr) {
            console.log(res);
        }
    });
 
but I'm getting 406 status code as response.
 
I need to access records from my angular app. How to do it in portal environment?
 
1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hi

currently the Web API only supports Create/Update/Delete methods, please see more info from the documentation: Use the Web API for portals - Power Apps | Microsoft Docs

the reason for that is because we have other methods for retrieving data:

 

what you can also do is creating your own retrieve API using custom Web Templates + FetchXML, take a look at this post that might help you: 

Creating a Custom Portal API to Retrieve Data | PowerObjects

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

3 REPLIES 3
Super User II
Super User II

Hi

currently the Web API only supports Create/Update/Delete methods, please see more info from the documentation: Use the Web API for portals - Power Apps | Microsoft Docs

the reason for that is because we have other methods for retrieving data:

 

what you can also do is creating your own retrieve API using custom Web Templates + FetchXML, take a look at this post that might help you: 

Creating a Custom Portal API to Retrieve Data | PowerObjects

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

@OliverRodrigues  Thank you very much for your quick response.

 

I have tried the web api because I need to retrieve custom entity's record from my angular 9 app that I linked into my portal app. In this scenarios how can I get records from angular app?

Hi, is your angular app inside Power Apps Portals? not sure how you are linking your app, can you give more details?

if your app still has access to Portal objects/pages or web templates, I would recommend using the Entities liquid object mentioned earlier.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Users online (37,011)