APIs & Integrations

jing
参加者

request url too long

解決

When I am getting data from hubspot api, for example: https://api.hubapi.com/crm/v3/objects/companies. If I include all properties, an error would occur saying the 'request url too long'. Is there any parameters that can select all properties automatically instead of passing wanted properties in request url?

0 いいね!
1件の承認済みベストアンサー
WendyGoh
解決策
HubSpot Employee
HubSpot Employee

request url too long

解決

Hey @jing,

 

Currently, there isn't a way to select all properties automatically and one possible way to include all properties without exceeding the request url limit, is to use the CRM API | Search.

 

In which you can control the returned properties on the POST body instead of the request url:

curl https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=YOUR_HUBSPOT_API_KEY \
  --request POST \
  --header "Content-Type: application/json" \
   --data '{
    "properties": [ "email", "state" ]
   }'

元の投稿で解決策を見る

2件の返信
WendyGoh
解決策
HubSpot Employee
HubSpot Employee

request url too long

解決

Hey @jing,

 

Currently, there isn't a way to select all properties automatically and one possible way to include all properties without exceeding the request url limit, is to use the CRM API | Search.

 

In which you can control the returned properties on the POST body instead of the request url:

curl https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=YOUR_HUBSPOT_API_KEY \
  --request POST \
  --header "Content-Type: application/json" \
   --data '{
    "properties": [ "email", "state" ]
   }'
jing
参加者

request url too long

解決

Thank you so much! That is exactly what I want.

0 いいね!