For the past week, we’ve been having a fairly urgent issue with our data pipeline due to the length of our requests to HubSpot. I believe this is because the Deal Properties API has started returning extra auto-generated properties. We use Stitch to get data from HubSpot into our data warehouse and, looking through Stitch’s logs, it does not seem to be able to talk to HubSpot anymore.
Stitch fetches data from HubSpot in the following order:
- It grabs all deal properties from HubSpot’s deal properties endpoint.
I believe that last week this endpoint may have started returning autogenerated properties that it did not use to - I am seeing ~300 properties that we don’t have in our data warehouse. They all start with the prefix ‘hs_’ and mostly correspond to timestamps for when a deal entered a particular dealstage. For example:
- ‘hs_date_entered_STAGEID’
- ‘hs_date_exited_STAGID’
- ‘hs_time_in_STAGEID’
2) It then hits HubSpot’s deals endpoint with those properties.
This creates a very long url because all the properties are listed as query params in the URL. The properties endpoint returns 512 properties and serializing all of these properties to the deals endpoint creates a URL over 26,000 characters long.
This second request fails. The Stitch script receives a “HTTPError: 414 Client Error: Request-URI Too Large” error. I did some poking around and it appears that this HubSpot endpoint is capped at around 2^14 = ~16000 characters. On average, a serialized property adds around 50 characters to the URL which means we would have had to add ~200 properties to our deal object in the past week to have broken this limit on our own - I’ve confirmed we did not do that. Especially given that we’ve never replicated any of these ‘hs_*’ properties in our data warehouse before, my suspicion is that the properties endpoint has started returning more properties.
This seems to make it impossible for us to use the HubSpot API to grab all of a deal’s properties, as by default the API does not return all of the properties.
We’d love to get to a world where Stitch can use the API like before. Unfortunately, we don’t control Stitch’s script - would it be possible to just set the URL-length limit to 2^16? (Or if it’s not intended that the endpoint surface these properties, could they stop getting sent?)
Any help moving this forward would be greatly appreciated as we have several experiments in flight that we’d like to evaluate.