Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,372
Community Members
 
Community Events
176
Community Groups

Zephyr Squad Cloud REST API gives 400 Bad Request with Production URL

Edited

Hello, I was trying out various GET requests given in the documentation, in python. I modified the cycleTest.py file from the zapi-cloud GitHub Project. When I use mock-url given in documentation, I get the mock-results as expected. But trying the same with production-url is giving me this error:

raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

With Postman, I get the error:

400 Bad Request, API not found.

The JWT Token is generating properly.

These are the parameters I am using:

  • Method: GET
  • headers = {
    'Authorization': 'JWT '+token,
    'Content-Type': 'application/json',
    'zapiAccessKey': ACCESS_KEY
    }
    (The token generated, my access key)
  • BASE_URL = 'https://prod-api.zephyr4jiracloud.com/connect/'
  • RELATIVE_PATH1 = '/public/rest/api/1.0/teststep/statuses'
    Edit: This path works now. But the second path is still giving the same error.
  • RELATIVE_PATH2 = '/public/rest/api/1.0/cycles/search?versionId=11673&projectId=10252'

I searched online, a 400: Bad Request is generated when the request is not done properly. But the GET method does not have any body associated to send in the request.

Please help. Thank You.

1 answer

Each JWT token is specific to an endpoint. Are you using different JWT tokens for RELATIVE_PATH1 and RELATIVE_PATH2?

Suggest an answer

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

Atlassian Community Events