Filtering object properties with python client API

I need to retrieve company properties through the API in a python script. I want to filter the results and only get the following properties : name,fieldType,createdAt,updatedAt

When I test on the API doc website with my private app token, everything works well and I only get the requested properties :


the result when using the doc (works)

But when I copy-paste the code in my editor and run it, the filter doesn’t work.


the result in my code (doesn’t work)

Since the code ad the API are the same, I suspect it might come from a difference in the library used locally and on the website?

For reference, I use version hubspot package 0.1.14.dev0 and hubspot-api-client 11.1.0.

Also, when I used cURL and used the following URL, it works well : https://api.hubapi.com/crm/v3/properties/company?archived=false&properties=name,fieldType,createdAt,updatedAt

Has anyone else experienced this?

Hi, @NRIO :waving_hand: Thanks for posting, Welcome to our community! I’d like to ask a few of our community champions if they have any troubleshooting suggestions — hey @SteveHTM @ChrisoKlepke, do you have any Python wisdom you can share with @NRIO?

Thank you very much for taking a look! — Jaycee

@NRIO - I suspect that you are correct in identifying a potential difference in the HubSpot library use here. For my own sanity, I typically use the “bare metal” request/response calls where the actual URL being used in the base API call is front and center rather than being obscured by a layer of API code.

I can definitely vouch that the base API call itself works to specifically return the requested properties.

Hope this helps,

Steve