APIs & Integrations

NRIO
Member

Filtering object properties with python client API

SOLVE

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)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)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,...

 

Has anyone else experienced this?

0 Upvotes
1 Accepted solution
SteveHTM
Solution
Key Advisor | Partner
Key Advisor | Partner

Filtering object properties with python client API

SOLVE

@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

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature

View solution in original post

2 Replies 2
SteveHTM
Solution
Key Advisor | Partner
Key Advisor | Partner

Filtering object properties with python client API

SOLVE

@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

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
Jaycee_Lewis
Community Manager
Community Manager

Filtering object properties with python client API

SOLVE

Hi, @NRIO 👋 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


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes