Showing results for 
Search instead for 
Did you mean: 

rest api to query swagger with Python


rest api to query swagger with Python


I want to query swagger using Python with the request package.

Simple queries succeed without any issue:





This returns a large json with many fields of which I only need 2.

Can I limit the fields returned in the json?
Some implementations of REST allow to specify a list of fields to be retrieved.


Is there some way to use boolean logic so that queries like makeName = XXX and (modelName = YYY or modelName=ZZZ) can be done?
Regards Hans




Re: rest api to query swagger with Python

This doesn't seem like a Swagger question, but more of an API design one. Swagger (or rather OpenAPI) is used to describe your API, and Swagger offers various tools to automate some aspects of it, but it is not what's serving the API.

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Watch the new Interview