Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How many JQL filters can be supported for issue object of Jira

shalakak January 8, 2019

How many JQL filters can be supported for issue object of Jira through rest Api.

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 9, 2019

Hello,

Its not going to be a number of objects directly but rather the text character count in the URL's length that would cause issues.  You should be cautious about depending on URL lengths above 255 bytes; as on the client side the Maximum URL Size in HTTP GET Request for most Clients or Browsers are limited to 255 bytes which amounts to approximately 2083 characters for the Length (Edge & chrome 2083, IE 2048, Firefox 2047... etc due to differences in resource handling per browser), and the API call is going to pass the statement via a formatted web request url but can exceed this limit when passed on the backend.

There is no actual hard set limitation on the URL length passed via API in a GET style statement, but you will eventually run into a "413 Entity too large", and would only really find the limit via testing.  Servers need to be able to handle the URL of any resource they would also serve to a client, but should be able to handle unlimited URL length in theory if they provided the call on the backend via a GET-based form (such as curl).  However a general guideline is that a server SHOULD return a "414 (Request-URI Too Long)" error status if a URL is longer than the server can handle for a client.

So as you build out a JQL exe:

project = ASDF

The URL for this Statement would be the following amounting to 59 characters in length:

http://BASE_URL/jira/browse/ASDF-1?jql=project%20%3D%20ASDF 

So following the 255 byte guideline you could in add in an additional approximately 2024 characters to the URL length without issue, but in theory indefinite up to the resource capacity of the system (you would eventually hit a 413 error)

A good way to verify that the URL stays under 255 and has the proper encoding is to

  1. build your search in JIRA first
  2. When you have the results you want, copy the link address. It has all the proper formatting already.
  3. Paste everything that comes after 'jqlQuery=' into your code and add your variables and such.

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events