cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Stevel
Level: Powered On

APIM custom connector - no content response

Hi,

I'm building a custom connector between PowerApps and Azure API management. We can call the API endpoint from CURL, Postman and SwaggerHub getting a valid response.

 

When we export the swagger 2.0 json file from APIM and import it into our custom connector it appears OK (after we add the required 200 and 405 responses to the json file). We then proceed to authorize the API in the connection (adding the API key) and test the connection at which time we get  an empty response body.

 

When I run the test in the PowerApps Connector Test tab I see (bold added):

Request:

URL:

https://msmanaged-na.azure-apim.net/apim/zpatient-xxxxxxxxxxxxxxxxxxxxxxxx/24

 

Method: Get

Headers:

{

  "Authorization": "Bearer eyJ0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

}

 

Response

Status

(200)

Headers

{

  "content-length": "0",

  "date": "Fri, 21 Feb 2020 15:25:58 GMT",

  "request-context": "appId=cid-v1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

}

Body (blank)

 

Schema validation:

Property "" type mismatch, Expected: "object", Actual: "string".

 

Any ideas why we are unable to get a proper response from our APIM call using PowerApps?

 

Thanks!
....Steve

 

In Postman, CURL and swaggerhub I get this response (for example):

{
"resourceType": "Patient",
"id": "24",
"extension": [
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:xxxxxxxxxxxxxxxxxxxxxxxxx",
"code": "2106-3",
"display": "White"
},
{
"system": "urn:oid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"code": "2028-9",
"display": "Asian"
},
{
"system": "urn:oid:xxxxxxxxxxxxxxxxxxxxxxxxx",
"code": "2076-8",
"display": "Native Hawaiian or Other Pacific Islander"
}
]
}
},
{
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:xxxxxxxxxxxxxxxxxxxx",
"code": "2186-5",
"display": "Not Hispanic or Latino"
}
]
}
}
],
"name": [
{
"text": "BBBBBBB AAAAAA",
"family": "AAAAAA",
"given": [
"BBBBBBBB"
]
},
{
"use": "old",
"text": "BBBBBB,XXXXXXXX"
}
],
"gender": "male",
"birthDate": "2009-xx-xx",
"deceasedBoolean": false,
"address": [
{
"use": "home",
"line": [
"123 Test Ave"
],
"city": "Test",
"state": "MA",
"postalCode": "02130"
}
],
"photo": [
{
"id": "24",
"url": "PatientImage/24"
}
]
}

 

1 REPLY 1
Community Support Team
Community Support Team

Re: APIM custom connector - no content response

Hi @Stevel ,

Could you please share more details about the Swagger OpenAPI definition file?

Which HTTP method do you use in your custom connector? Get or Post?

 

Based on the error message that you mentioned 'Property "" type mismatch, Expected: "object", Actual: "string', it seems to tell that, there is something wrong with value you provided for a specific property within your custom connector, it requires to provide Object value, but you provide a String value.

 

If you defined the POST action path in your custom connector, please check if you have provided a proper Request Body schema when you test the action in your custom connector.

 

The standard OpenAPI definition file should be like below:

https://procsi.blob.core.windows.net/docs/SentimentDemo.openapi_definition.json

 

In addition, as an alternative solution, you could also consider create your custom connector from scratch based on your Azure API:

3.JPG

then check if the issue is solved.

More details about creating a custom connector in PowerApps, please check the following video resource:

https://www.youtube.com/watch?v=dBCS1nPsDiE

 

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.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,491)