JIRA JQL

Nishant Sharma May 11, 2021

Hi there,

I am trying to understand about JQL API. I have gone through https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-group-jql.

I understood JQL a query to filter out either issue or user or project may be using simple JQL or complex JQL query.

 

And just to understand its behavior, I am trying to access the project as follows   /api/rest/2/search?jql=project=Demo 

Can we use JQL in v2 APIs? if Yes, then what all API are there where we can use the JQL query parameter?

 

Please let me know.

 

Regards,

Nishant

 

2 answers

0 votes
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2021

Hi @Nishant Sharma  Instead of using JQL in REST API, i perfer to create filter and filter id, which is easy to use. If you still looking to GET JQL result via API then below video can help. 

 

https://www.youtube.com/watch?v=oSxBnqdF3-A

 

Thanks,

Vikrant Yadav

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2021
Nishant Sharma May 12, 2021

Thanks, @Vikrant Yadav  I have gone the share youtube link and reference doc link.

It was quite helpful.

 

I am confused on the Jira API for JQL. Are we suppose to use /rest/api/2/search this API to query any types of data like issues or users or projects?

 

Please let me know.

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2021

Hi @Nishant Sharma  The latest version of the Jira Cloud platform REST API is version 3, which is in beta. Version 2 and 3 of the API offer the same collection of operations

Like Nishant Sharma likes this
Nishant Sharma May 13, 2021

I agree @Vikrant Yadav . But let me ask my query in a different way.

 

Is jql queries only used to retrieves Issues? or we can retrieve users or maybe projects as well?

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2021

JQL is used to retrieve issues only. It show the list of issues created under project or create by a user. It is flexible and faster way to search issues.

Like Nishant Sharma likes this
Nishant Sharma May 16, 2021

Thanks @Vikrant Yadav  for confirming it. Please let me know if my understanding on below points is correct.

1. JQL GET is used for basic search.

2. JQL POST is used for Advance and Basic Search?

Is my understanding on above two points is correct. Please correct me in case it's wrong .

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2021

POST method is used to send data to a server to create or update a resource like update issue status, while GET method is used to request data from a specified resource and should have no other effect.

 

Thanks!

Like Nishant Sharma likes this
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2021
Like Nishant Sharma likes this
Nishant Sharma May 16, 2021

I am trying to point you here

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-get

 

If the JQL query expression is too large to be encoded as a query parameter, use the POST version of this resource.

This operation can be accessed anonymously.

0 votes
Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2021

@Nishant Sharma 

What are you trying to achieve exactly?

JQL is the way to search for issues in Jira. There are basic queries and there are advanced ones.

Why are you using rest api?

Best,

Fadoua

Nishant Sharma May 11, 2021

I just want to understand how JQL queries work using rest API.

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2021

ok I understand that sometimes we need rest api, however searching for issues using JQL let you create powerful filters, dashboards, and reports.

You should mainly focus on understanding how to write powerful queries. Then it is up to you if you want to use rest api.

Best,

Fadoua

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events