Forum Discussion
9 Replies
- michaelsatishOccasional Contributor
I'm using Python and requests library
Hi Satish,
Could you please clarify which of the REST methods do you use? Do you face similar issues for different REST methods?
Make sure that you have the target item in QAC - check Test Id and Project Id on the corresponding screens.
If you use proxy, please try connecting to our web service without a proxy server.
Anastasia
Customer Care Team- michaelsatishOccasional Contributor
Hi Natsya,
Thanks for the reply. I've checked the Test Id and Project Id with the target (ALM Complete)Here is the code that I'm using written with Python and using requests libraries. The username and password are coming from JSON file
url = 'https://<server>/rest-api/service/api/v1/projects/<project ID>/tests/<test ID>'
token = base64.b64encode(bytes(data['credentials']['id'] + ':' + data['credentials']['password'], 'utf-8'))
headers = {'Accept': 'application/json',
'Authorization': 'Basic ' + str(token)
}
response = requests.get(url, headers=headers, verify=False)
print(response.text)
print(response.status_code)log.
Handler for Request not found:
Request.HttpMethod: GET
Request.HttpMethod: GET
Request.PathInfo: /api/v1/projects/<project ID>/tests/<test ID>
Request.QueryString:
Request.RawUrl: /rest-api/service/api/v1/projects/<project ID>/tests/<test ID>404