Hi,
i created a swagger json file. see below for the swagger yaml file.
i then went to the powerapps online interface & created a custom API. Then a connection using the custom api that i just created.
everything goes fine. but after a min, my connection shows "parameter value missing".
any ideas?
# as a demonstration of an API spec in YAML
swagger: '2.0'
info:
title: CheckPA
description: Checking some API
version: "1.0.0"
# the domain of the service
host: xyz.abc.org
# array of all schemes that your API supports
schemes:
- https
# will be prefixed to all paths
basePath: /External/service/v1
produces:
- application/json
paths:
/List/der/yub?listFields=email:
get:
summary: some reg list
description: some desc
operationId: getList
responses:
200:
description: OK. A list
400:
description: weird
parameters: []
securityDefinitions:
usersecurity:
type: basic
Hi @MDC
Please see below for a working JSON file (fetches ECB currency exchange rates).
Indeed I have defined the parameters in the middle of the definition, and the query is not included in the path definition.
Hope this helps.
{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Fixer" }, "host": "api.fixer.io", "paths": { "/{FXdate}": { "get": { "description": "Fetches historical FX rates from fixer.io", "operationId": "Run", "parameters": [ { "name": "FXdate", "in": "path", "required": true, "description": "FX date in yyyy-mm-dd format", "type": "string" }, { "name": "base", "in": "query", "required": true, "description": "ISO symbol of base currency", "type": "string" } ], "responses": { "200": { "description": "Successful response", "schema": { "title": "The response of the api.", "type": "object", "properties":{ "base":{ "type": "string" }, "date":{ "type": "string" }, "rates":{ "type": "object", "properties":{ "USD":{ "type": "number", "format": "double" }, "EUR":{ "type": "number", "format": "double" }, "GBP":{ "type": "number", "format": "double" }, "RUB":{ "type": "number", "format": "double" }, "CHF":{ "type": "number", "format": "double" }, "BRL":{ "type": "number", "format": "double" }, "CZK":{ "type": "number", "format": "double" }, "HKD":{ "type": "number", "format": "double" }, "SGD":{ "type": "number", "format": "double" } } } } } } } } } } }
Hi Meneghino,
Thanks for the reply.
i have tried to define the swagger file like you have i.e. in the parameters section i defined the path & query parameters but i still have the same issue.
OK, sorry I couldn't help.
Hi @MDC,
How you created this swagger file?
Please take a look at the get help with swagger file in the article below:
https://powerapps.microsoft.com/en-us/tutorials/register-custom-api/
For Swagger specification for the parameter object, see:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameter-object
Further, for web API, take a try to generate the swagger under Visual Studio.
See if the blog would help:
Guest Blog:Build Custom API on Microsoft Flow and PowerApps with Authentication
Regards
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
195 | |
52 | |
41 | |
39 | |
35 |
User | Count |
---|---|
261 | |
80 | |
71 | |
69 | |
66 |