Hello community. After spending hours and hours reading community answers, GitHub README's, you documentation, I decide to use this last resort in case I find an answer.
First of all sorry about my frustration, but setting up Jir+ZEP+ZAPI, it's really a nightmare, believe me. I will tell you my story.
First of all, spent hours clicking here and there trying to find my AccountID. Why don't you have a simple option to click and get my account ID? Finally I find an answer which following this notation: PASTE IN THE BROWSER: https://<username>.atlassian.net/rest/api/3/myself
and you get a JSON object notation with the accountID, done with that. Anyway a second way is to click the upper left icon, then select People and finally click your username from the right panel. I intentionally writing down the instructions, to help many many other developers, because believe me, the instructions are vague and outdated.
In that point I believed that I had some kind of progress, but to access the ZAPI you also need the famous "JWT Token", oh my. After downloaded dozens of libraries and languages in JavaScript, Java and Python none of these seems to be working. Furthermore noone seems to clarify what tokens you need to use ? Do you use the ZAPI system token or something else ? I tried every combination and came up with nothing.
First I downloaded the Java jar file with dependencies found here https://github.com/zephyrdeveloper/zapi-cloud but when you try to run it you get "missing main function". Missing main function, from where? What I should do to run this? Why I should spend hours to set it up?
After that I tried the python script, which I most familiar with from the same source. And came up that this is not working either. I get all the time "authorization 401 error". Maybe is the API keys ? Maybe something else? I don't know really. I am not even sure if the endpoint is the right one because I found dozens of these with "/1.0", "/2"/ and "/3" versions(?) I suppose.
Finally I came up with the JS script and tried to run with concerns and I was right. When you try to run this you get "Syntax error, unexpected token *" because of the "import * as JWT from "atlassian-jwt' even if you run "npm atlassian-jwt" before. I am using the wrong version of npm? Something else? Why I should spend hours and hours to find an answer and search from node versions and so? Is this normal? I have spent years of development and never see something like that.
So anyway, the finally answers are:
- How I can generate a JWT key?
- Which is the right endpoint to access ZAPI cloud functions?
- What API keys I should need?
I have already include the Zephyr and ZAPI addon in my cloud.
Hope someone out there will help, regards and forgive me but trust me, many of your documentations are outdated.
- How I can generate a JWT key?
Pre-requisite
https://********.atlassian.net/people/5bb7ad0ccc53fd0760103780
or
just hit the url in browser
https://********.atlassian.net/people /rest/api/3/myself
or for all user accountid
https://********.atlassian.net//rest/api/3/users/search
How to generate JWT:
https://support.smartbear.com/kb/sample-create-jwt-token-for-a-zapi-cloud-api/
- Which is the right endpoint to access ZAPI cloud functions?
https://prod-api.zephyr4jiracloud.com/connect/
Refer document for all the api’s
https://zfjcloud.docs.apiary.io/#reference/attachment/get-teststep-attachment-list/creates-new-cycle
- What API keys I should need?
API key is not required for ZAPI
API key is required for zfj importer utility
API keys is only required to authenticate for jira api call’s, instead of username and password you have to provide username and apikey to authenticate jira call
To generate the api key >> Navigate to profile >> Manage your account >> Security >> api tokens
https://id.atlassian.com/manage-profile/security/api-tokens
How to use in postman
If you are still facing issue with above steps contact zephyr support
Hi Jagdeesh,
I am trying to create/fetch test step data using zapi api, i am not able to generate JWT, I am tired and exhausted from searching for the correct answer, can you please provide a proper working sample of JWT generation in c#.
the link I am using to get the test step. Your help is greatly appreciated.
https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/teststep/#####?projectId="###"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i totally agree, it is very frustrating and poor implementation of zapi API and documentation, why would you need a tool to generate JWT, it should have been simple straight forward documentation and implementation by open standard, which should easy and anyone can do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.