cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Custom Connector (GET method) with API Key showing no results in Collection

Hi All,

 

I'm using Custom Connector to Call our internal system's GET API, which provides all the programs a staff member is registered to when we give a staff ID. We have a security Token, which I'm using as the API Key. API showed 200 response after I provided Staff ID, API Key, and Enterprise ID (which is constant).

So I followed below;

Crated a custom Connector (XX Connect) - Since I'm getting only program Key and Name, i used the Response Body given is the documentation:

{

"Key":"123"

"Value":"abacr"

}

 

Custom Connector action is GetPrograms(StaffID,EnterpriceID)

2) Once all this is done I tested it and it gave me 200 response (Refer attached custom Connector test result"). Got 3 values to it.

 

3) I did a small program, when I press the button, it will pass Staff ID and Enterprise ID, and try to get the collection. I used the same values I used for the step 2, which was successful test.

 

Powerapp loaded and it showed it executed, but as attached, when I check the Collection, it shows a BLANK table with "Key","Value" headings. ☹️ I now spent about 2 days and still no luck.

 

 

Can anyone please help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @Dhanushka_Aus ,

Do you mean that the custom connector action could return proper results when you test it, but it could not populate a collection within your canvas app?

 

Based on the first screenshot that you mentioned, it seems that the results from your custom connector action is a Table value rather than a Object value, so when you specify the JSON Schema within the Response Body, you should specify the following sample JSON Schema (type Object Array rather than Object😞

5.JPG

[
   {
     "Key": "123",
     "Value": "abacr"
   },
   {
     "Key": "456",
     "Value": "efdgyy"
   }
]

Please consider take a try with above solution to re-configure your custom connector action Body Response and re-publish it, then re-create a new connection to your custom connector from your canvas app, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Hi @Dhanushka_Aus ,

Do you mean that the custom connector action could return proper results when you test it, but it could not populate a collection within your canvas app?

 

Based on the first screenshot that you mentioned, it seems that the results from your custom connector action is a Table value rather than a Object value, so when you specify the JSON Schema within the Response Body, you should specify the following sample JSON Schema (type Object Array rather than Object😞

5.JPG

[
   {
     "Key": "123",
     "Value": "abacr"
   },
   {
     "Key": "456",
     "Value": "efdgyy"
   }
]

Please consider take a try with above solution to re-configure your custom connector action Body Response and re-publish it, then re-create a new connection to your custom connector from your canvas app, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted

Hi @v-xida-msft,

 

Awesome and thank you so much. Your solution made the application work and collection gathered. Thank you so much.😊👍

 

Best regards

Dhanushka

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (6,046)