ALMComplete Rest API Call Error(Handler for Request not found)
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ALMComplete Rest API Call Error(Handler for Request not found)
The stated error is displayed when i make a rest api call to get a resource. Can someone please shed some light on this? thanks in advance
text - Handler for Request not found:
status_code - 404
url -
https://<server>/rest-api/service/api/v1/projects/<projectID>/tests/<testcaseID>
I'm able to access the metadata and the response is 200
url -
https://<server>/rest-api/service/metadata
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using Python and requests library
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Satish, Thank you for sharing your script with me.
What product edition do you use - SaaS or On-Premises?
For On-Premises:
REST API URL: http://[your server name]/rest-api/service
For SaaS:
REST API URL: https://rest.qacomplete.smartbear.com/rest-api/service
Examples of GET methods URL's:
SaaS:
https://rest.qacomplete.smartbear.com/rest-api/service/api/v1/projects/99999/tests/777777
Ent:
http://ServerQAC/rest-api/service/api/v1/projects/99999/tests/777777
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nastya,
Its On-Premises and the URL I've posted was build upon the examples provided in the documentation and it matches the format you have given as example
I'm able to access the metadata but not able to get a particular test
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Satish,
Are you able to access test info in a browser, using the URL, formed by your script?
Example:
Customer Care Team
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you so much for the response. Getting the same error if I paste the code generated URL in the browser.
I reckon the version of ALMComplete that i use does not expose Rest API calls.
Can you please confirm?
I'm using ALM Complete Version 9.9.5
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, ALMComplete 9.9.5 doesn't provide REST API. We introduced REST API in version 10.2, so if you want to use it, please consider upgrading your instance.
To get assistance with the upgrade, don't hesitate to contact SmartBear Customer Care.
Customer Care Team
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much. Appreciate the response. Please close this thread
