Forum Discussion

qb1ka's avatar
qb1ka
Occasional Contributor
1 month ago

Error Code 104 on a POST Request

I am using zephyr squad api for exporting tracebility

however i am getting error code 104 on zephyr, the error message is not helpful. I have tried putting version id as well but I get the same error. the requirements id is the Jira id of type=requirement.

this is my code

def zephyr(requirement_ids: list[str], export_type: str = "excel"):

 

rel = "/public/rest/api/1.0/traceability/export"

method = "POST"

url, jwt_token = token_generator(rel, query_string=None, call=method)

 

headers = {

"Authorization": jwt_token,

"zapiAccessKey": ACCESS_KEY,

"Accept": "application/json",

"Content-Type": "application/json"

}

payload = {

"exportType": export_type,

"requirementIdList": [str(r) for r in requirement_ids]

}

 

resp = requests.post(url, headers=headers, data=json.dumps(payload))

try:

resp.raise_for_status()

print(resp)

except requests.HTTPError as e:

print(resp.text)

 

zephyr_traceability_export(requirement_ids=["918731"], export_type="excel")

5 Replies

  • Hi qb1ka​,

    Please check/confirm the following:

    1. Does your url variable include "/connect" in your jwt_token code? Otherwise rel variable in your code should be "/connect/public/rest/api/1.0/traceability/export/"

    Note: You will need to re-generate the JWT token if you did not include "/connect"

    I don't see any other errors from the code above so the issue could be in your jwt_token code/script.