Forum Discussion

zeigerr's avatar
zeigerr
Occasional Contributor
4 years ago
Solved

Python Example to retrieve information via REST API

Hi,

 

I am looking for a python code example to access the Zephyr REST API.

Expecially how authenification is done. Currently I get 401 response.

The version I am using is:

Zephyr for Jira - Test Management for JIRA (Server) 6.1.1

 

Best regards,

Raphael

  • See Process Method - "The Process method returns a Process object by its application name and index. If the process is not found, the method returns an empty object and posts the message “The process … was not found” to the test log". Majority of the methods in TC are like this i.e. returns object or null.

     

    An empty object doesn't throw an exception.

2 Replies

    • zeigerr's avatar
      zeigerr
      Occasional Contributor

      Hi Matt, thanks a lot for the direction/information.
      I currently have found a python project (mentioned by atlassian) which works for me to extract data. Also the module seems to have a lot of feature and I do not understand it completely. Also  as an authenitfication method I have to provide my domain password, I have not managed to run it with a autentification token.

      But meanwhile I have wriiten a 20-line perl script which uses plain curl invokations to retrieve and upload data using the ZAPI REST API.
      Since this worked better understandable for me I am going to use plain GET/POST resquests using curl.exe on windows.
      I will mark this question as answered. Thanks for your help.