Hello all,
I would like to ask how can I create Test or any kind of issue through Zephyr's API. I was able to create test cycle through
the following API https://zfjcloud.docs.apiary.io/#reference/cycle
I did not find the way to create an issue or more specifically test case via API. I would really appreciate a tip how to configure headers and body too.
Can you please help me with this?
Solved! Go to Solution.
Hi @apuna12
https://my-jira.atlassian.net/rest/api/3/issue ? this endpoint is correct, since this is JIRA Api call and for create cycle its zephyr operation so end point for zephyr api's is different
As per screenshot error I can see that you are using jira password as password field in basic authentication. In jira you can't use password in basic authentication, you have to use JIRA Api key value as password field.
Follow below steps to generate your JIRA Api key:
1. Click on user profile
2. Navigate to manage account
3. Click on security
3. Create and manage api tokens
or directly navigate to url : https://id.atlassian.com/manage-profile/security/api-tokens
and create api token
Once you generated the api token >> copy the api token value and use it as your password field in postman basic authentication and try again
Thanks
Jagadeesh
Hi
Creating TestCase is nothing but creating the issue in jira, this is JIRA Api call, you can follow JIRA Api documentation and create test cases
Thanks
Jagadeesh
Hello @JagadeshMadhura
I tried the link you posted. I copied the request body, added the headers which are used in the page, used basic authentication but I am still getting an error. Can you please help me figure out where is the problem?
And in the body I have the body from the page you posted (Except I used my profile ID). Last time I used the following API to create a cycle
https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/cycle
This time I am using https://my-jira.atlassian.net/rest/api/3/issue ? Is this OK? Seems weird to me.
Thanks,
Tibor
Hi @apuna12
https://my-jira.atlassian.net/rest/api/3/issue ? this endpoint is correct, since this is JIRA Api call and for create cycle its zephyr operation so end point for zephyr api's is different
As per screenshot error I can see that you are using jira password as password field in basic authentication. In jira you can't use password in basic authentication, you have to use JIRA Api key value as password field.
Follow below steps to generate your JIRA Api key:
1. Click on user profile
2. Navigate to manage account
3. Click on security
3. Create and manage api tokens
or directly navigate to url : https://id.atlassian.com/manage-profile/security/api-tokens
and create api token
Once you generated the api token >> copy the api token value and use it as your password field in postman basic authentication and try again
Thanks
Jagadeesh
That worked! 🙂
Thanks,
You are awesome.
Have a nice day 🙂
Subject | Author | Latest Post |
---|---|---|