Forum Discussion

breezeWind's avatar
Occasional Visitor
2 years ago

Unable to trigger Zephyr for Jira Server REST API

I have Jira Server `7.10.1` and Zephyr for JIRA `` running on my local linux server.


Now I'd like to use API to get the information in Zephyr related fields.


Here's the python code that I used to fetch the information in Jira Zephyr fields.

import config
import requests
import base64

auth = base64.b64encode(f"{config.username}:{config.password}".encode())
header = {
"Authorization": "Basic " + auth.decode(),
"Content-Type": "application/json",
"Accept": "application/json",

response = requests.get(f"{config.jira_url}/rest/zephyr/1.0/zchart/issueStatuses?projectId=13900", headers=header)

I've checked that I can use `config.username` and `config.password` to login my Jira server.


And I've given permissions to `config.username` so that it can view the content of Jira project with project id = 13900.


However, when I run `print(response.status_code)`, I get `403`. Does anyone know why my python code doesn't work?


The value of `response.text` is `{}`. I can't get any further information from `response`.


I created the above code by referencing the document in ``.


This article says that I should change `rest/zephyr/1.0` to `rest/zapi/1.0` to make the API work.

But after making this change, I get `java.lang.NullPointerException` error.


Here's part of the error message:


2023-06-27 05:50:36,214 http-nio-8080-exec-242 ERROR [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet [default] in context with path [] threw exception


at com.atlassian.logging.log4j.FilteredPatternLayout.formatStackTrace(

at com.atlassian.logging.log4j.FilteredPatternLayout.format(

at org.apache.log4j.WriterAppender.subAppend(

at org.apache.log4j.RollingFileAppender.subAppend(

at org.apache.log4j.WriterAppender.append(

at org.apache.log4j.AppenderSkeleton.doAppend(

at com.atlassian.jira.logging.JiraHomeAppender.doAppend(

at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(

at org.apache.log4j.Category.callAppenders(

at org.apache.log4j.Category.forcedLog(

at org.apache.log4j.Category.fatal(


... 12 filtered

at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(

... 53 filtered


... 1 filtered


... 16 filtered


... 19 filtered

at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(

... 10 filtered

at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(

... 4 filtered

at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(

... 26 filtered

at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(

... 23 filtered

at java.util.concurrent.ThreadPoolExecutor.runWorker(

at java.util.concurrent.ThreadPoolExecutor$

at org.apache.tomcat.util.threads.TaskThread$

No RepliesBe the first to reply