Forums

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

how to execute ZQL Query through api ?

pksah May 19, 2020

I want o execute below zql :- project = "XYZ" AND fixVersion in ("a1","a2") AND cycleName = "Regression" .

Any suggection how to execute this query in jmeter or postman.

I am using JIRA cloud.. my jira url is like - https://<companyName>.atlassian.net .

3 answers

0 votes
pksah May 19, 2020

Thanks mate for replying me back. 

so far I have understood that 

For (JIRA) - I have to use jira api token.

For zephyr- I have to use JWT and zapiAccesskey.

My question is If I ´want to execute a zql query from postman/jmeter... what will be the uri

https://<companyName>.atlassian.net/rest/zapi/latest/zql/executeSearch?zqlQuery=project="XYZ"+AND fixVersion+in+("a1","a2")+AND+cycleName="Regression"

or

https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/zql/executeSearch?zqlQuery=project="XYZ"+AND fixVersion+in+("a1","a2")+AND+cycleName="Regression"

jagadeesh madhura
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2020

Hi @pksah you have to use below endpoint for all the api call's 

https://prod-api.zephyr4jiracloud.com/connect/

you can refer the apiary documentation, where you will get sample request and response

https://zfjcloud.docs.apiary.io/#

Jinansh Patel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 28, 2021

@jagadeesh madhura 

Can you help me out with the canonical query string for 

https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/zql/filters/quicksearch?query=project="TTP"

I am trying to understand it from https://developer.atlassian.com/cloud/bitbucket/query-string-hash/ but I am not able to make it work for the above query

I am getting the following error while executing the above API:
Expecting claim 'qsh' to have value A but instead it has the value B

Thank you for your help

jagadeesh madhura
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2021

@Jinansh Patel  You will get this qsh error when there is issue with JWT generation. You can use the sample project in GIT hub for generating the JWT and try again.

https://github.com/zephyrdeveloper/zapi-cloud/tree/master/Samples/src/com/thed/zapi/cloud/sample

For more details please follow :

https://support.smartbear.com/zephyr-for-jira-cloud/docs/api/jwt-token.html

0 votes
jagadeesh madhura
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2020
0 votes
Harsh Dubey
Contributor
May 19, 2020

Hello @pksah,

You can use free add-on available in marketplace named with ZAPI to access ZFJ data programmatically.
refer below documentation link to setup & use ZAPI to access API's.

Let us know if you face any issues.

Thanks.

Suggest an answer

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

Atlassian Community Events