APIs & Integrations

NRIO
Mitglied

Filtering object properties with python client API

lösung

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 Akzeptierte Lösung
SteveHTM
Lösung
Autorität | Platinum Partner
Autorität | Platinum Partner

Filtering object properties with python client API

lösung

@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

Lösung in ursprünglichem Beitrag anzeigen

2 Antworten
SteveHTM
Lösung
Autorität | Platinum Partner
Autorität | Platinum Partner

Filtering object properties with python client API

lösung

@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/-in
Community-Manager/-in

Filtering object properties with python client API

lösung

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


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