PyxelRest allows you to query Swagger 2.0/OpenAPI REST APIs (or any HTTP/HTTPS URL).
You can do it using Microsoft Excel or python.
PyxelRest will expose formulas within Microsoft Excel, each formula can be used to query a REST API.
Once at least one REST API has been configured, you will have access to Microsoft Excel array formulas (dynamic and legacy) and Visual Basic for Applications functions:
Example with petstore REST API using formulas generated based on the OpenAPI definition.
If you want to query a URL yourself, you can use the pyxelrest service, acting like postman, within Microsoft Excel:
Example using pyxelrest formulas to query any URL (as in Postman).
Functions are automatically re-generated on Microsoft Excel startup and on configuration update.
Even if you should not need it, you can manually update functions by clicking on the Update Functions button within PyxelRest tab.
Update check is only performed while Microsoft Excel is running. You will be prompted in case one is available (it can be deactivated).
PyxelRest will expose Python functions, each function can be used to query a REST API.
Once at least one REST API has been configured, you will have access to functions:
import pyxelrest
configuration = {'petstore': {'open_api': {'definition': 'https://petstore.swagger.io/v2/swagger.json'}}}
pyxelrest.load(configuration)
from pyxelrest.generated import petstore
# Functions are available as python functions within petstore (in this case) and can be used as such
user = petstore.getUserByName("test")
# {'id': 9999, 'username': 'test', 'firstName': 'test', 'lastName': 'test', 'email': 'test@test.com', 'password': 'test', 'userStatus': 0}
print(user)
Example with petstore REST API using functions generated based on the OpenAPI definition.