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

Test cycle creation via API

Edited

I am trying to create test cycle in zephyr from python scripts but getting multiple errors while making an API call. Could someone correct me where I am going wrong?

**Note:**

The tested credentials in my code are valid.

**With Encoding:-**

import base64
from json import dumps

import requests

newCycleValues = dumps({
"clonedCycleId": "",
"name": "Foo",
"build": "",
"environment": "",
"description": "",
"startDate": "",
"endDate": "",
"projectId": "1234",
"versionId": "1234",
"cloneCustomFields": False
})

baseURL = 'https://foo.foonet'
createCycleURL = baseURL + '/rest/zephyr/latest/cycle'
headers = {"Authorization": "Basic " + str(base64.b64encode(bytes('foo' + ":" + 'boo', 'utf-8'))), "Content-Type": "application/json"}

x = requests.post(createCycleURL, data=headers, json=newCycleValues)

print(x.text)
print(x.status_code)

**Error:-**

{} 403

**Without Encoding:-**

import base64
from json import dumps

import requests

newCycleValues = dumps({
"clonedCycleId": "",
"name": "Foo",
"build": "",
"environment": "",
"description": "",
"startDate": "",
"endDate": "",
"projectId": "1234",
"versionId": "1234",
"cloneCustomFields": False
})

baseURL = 'https://foo.foonet'
createCycleURL = baseURL + '/rest/zephyr/latest/cycle'
headers = {"Authorization": "Basic " + 'foo' + ":" + 'boo', "Content-Type": "application/json"}

x = requests.post(createCycleURL, data=headers, json=newCycleValues)

print(x.text)
print(x.status_code)

**Error:-**

{} 403

1 answer

0 votes
nmenere
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 12, 2020

Hi @Prasad Rajassekaran ,

This community space is for the Automation capabilities within Jira. You may have better luck contacting Zephyr or trying another space.

 

Cheers,

Nick [Atlassian - Automation Group Product Manager]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events