Maximum length of GET request for the API

Occasional Contributor

Hi,

 

I'm using the "get all tickets"(https://developers.hubspot.com/docs/methods/tickets/get-all-tickets) API call, but I'm trying to get around  600 properties, some with very long names. If I try to get them all in one call I receive "414 Request-URI Too Large", which is expected, but I was unable to find what is the maximum size allowed.
Trying different numbers I discovered the with a URL request of about 16300 I can still perform the request.
My question is, can I trust that this number will be mantained? Do you have a more precision definition? is this a constant for all requests?

Reply
0 Upvotes
3 Replies 3
Highlighted
Regular Advisor | Silver Partner

Hi @Bernardo_Cobli 

 

GET Requests are usually limited to 2,048 Characters.

 

Can you use a different method? e.g. POST?

 

There's no limits (as far as I know) to POST requests.

 

Cheers

Mike

 

 

Occasional Contributor

Hi @Mike_Eastwood ,

 

Sorry for the delay, the method is described as a GET, so I am gessing that I can't use a POST method.

About the limit, the GET limit is actually defined between client and server, the 2048 limit is a defaut for some browsers, but in this case I was able to get about 16300 characters without an error, so that isn't the limit.

Reply
0 Upvotes
Regular Advisor | Silver Partner

Sorry, I wasn't very clear – as far as I know there's a limit to query lengths in a URI.

 

The GET method from the API should return a significant amount of data easily.

 

To me – from the error "414 Request-URI Too Large" I would assume the query URI called by you code is too long. Difficult to know without seeing your code.

 

Can you just request all properties? Then the Request URI would be shorter?

 

Cheers

Mike

 

 

 

Reply
0 Upvotes