Ask a Question

ALMComplete Rest API Call Error(Handler for Request not found)

SOLVED
michaelsatish
Occasional Contributor

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

 

9 REPLIES 9
michaelsatish
Occasional Contributor

I'm using Python and requests library 

Nastya_Khovrina
SmartBear Alumni (Retired)

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. ⬇️⬇️⬇️

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

Nastya_Khovrina
SmartBear Alumni (Retired)

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. ⬇️⬇️⬇️

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

 

 

Hello Satish,

 

Are you able to access test info in a browser, using the URL, formed by your script?

 

Example:

11.png

Natalie
Customer Care Team

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
michaelsatish
Occasional Contributor

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 

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.

Natalie
Customer Care Team

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
michaelsatish
Occasional Contributor

Thank you so much. Appreciate the response. Please close this thread 

cancel
Showing results for 
Search instead for 
Did you mean: