cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrkschrstn
Microsoft
Microsoft

Http Connector and Swagger

Hi,

I’ve created a simple Azure Machine Learning model with its web service. I exported the swagger file and created custom API connector, which worked quite well. When I consume the connector inside a flow (Http Swagger Connector) it shows me the query values but never the request body json, which makes it impossible to enter the required payload.
Thanks


////////////////////////////
Used Swagger file:
{
"swagger": "2.0",
"info": {
"version": "2.0",
"title": "Global Loss Event Impact V2 [Predictive Exp.]",
"description": "No description provided for this web service."
},
"host": "europewest.services.azureml.net:443",
"basePath": "/workspaces/30a0ff4bxxxxxxxxxxxxx80b0/services/1f31xxxxxxx02a801acxxxxxc0",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/execute": {
"post": {
"summary": "Execute the web service and get a response synchronously",
"operationId": "execute",
"parameters": [{
"name": "api-version",
"in": "query",
"description": "The API version to use",
"required": true,
"type": "string",
"default": "2.0",
"enum": [
"2.0"
]
},
{
"name": "format",
"in": "query",
"description": "The format of the input to the web service",
"required": true,
"type": "string",
"default": "swagger",
"enum": [
"swagger"
]
},
{
"name": "body",
"in": "body",
"description": "Execution request",
"required": true,
"schema": {
"$ref": "#/definitions/ExecutionRequest"
}
}
],
"responses": {
"200": {
"description": "Execution results",
"schema": {
"$ref": "#/definitions/ExecutionResults"
}
}
},
"security": [{
"api_key": []
}]
}
}
},
"definitions": {
"ExecutionRequest": {
"title": "Execution request",
"properties": {
"Inputs": {
"$ref": "#/definitions/ExecutionInputs"
},
"GlobalParameters": {
"$ref": "#/definitions/GlobalParameters"
}
}
},
"ExecutionResults": {
"title": "Execution Results",
"properties": {
"Results": {
"$ref": "#/definitions/ExecutionOutputs"
}
}
},
"GlobalParameters": {
"title": "Global parameters definition",
"type": "object"
},
"ExecutionInputs": {
"title": "Execution inputs defintion",
"properties": {
"input1": {
"items": {
"$ref": "#/definitions/input1Item"
},
"type": "array"
}
},
"type": "object"
},
"ExecutionOutputs": {
"title": "Execution outputs defintion",
"properties": {
"output1": {
"items": {
"$ref": "#/definitions/output1Item"
},
"type": "array"
}
},
"type": "object"
},
"input1Item": {
"required": [
"EVENT_ID",
"Date",
"Country",
"Location",
"Latitude",
"Longitude",
"Magnitude",
"LossImpactUSD"
],
"properties": {
"EVENT_ID": {
"type": "string"
},
"Date": {
"type": "integer",
"format": "int32"
},
"Country": {
"type": "string"
},
"Location": {
"type": "string"
},
"Latitude": {
"type": "number",
"format": "double"
},
"Longitude": {
"type": "number",
"format": "double"
},
"Magnitude": {
"type": "number",
"format": "double"
},
"LossImpactUSD": {
"type": "integer",
"format": "int32"
}
}
},
"output1Item": {
"required": [
"Country",
"Location",
"Magnitude",
"LossImpactUSD",
"Scored Labels"
],
"properties": {
"Country": {
"type": "string"
},
"Location": {
"type": "string"
},
"Magnitude": {
"type": "number",
"format": "double"
},
"LossImpactUSD": {
"type": "integer",
"format": "int32"
},
"Scored Labels": {
"type": "number",
"format": "double"
}
}
}
},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"description": "For example: Bearer abc123",
"name": "Authorization",
"in": "header"
}
}
}

1 REPLY 1
Leo09
Helper V
Helper V

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,399)