I am trying to retrieve information from Clarity REST API's using Python . So, as a part of this I just tried to get response code from an URL. When I am trying to get response from an URL regarding clarity URL like this, "https://clarity-url/rest/describe/index.html#!". I am getting a response of 403 [FORBIDDEN] error .
But when I am trying to get a response from an URL like this, "https://clarity-url/", getting response of 200. However, I am able to browse the both URL's. Could anyone help me to resolve this issue?
First off, "https://clarity-url/rest/describe/index.html#!" is not a valid REST endpoint. Try something easier. Since you mentioned the REST describe page you have the documentation. Let's use the project get endpoint.
Pick a project in the environment, look in the URL on the project properties or project team/staff page and grab the database ID from the URL. Then put it in the project get endpoint. For example:
https://clarity-url/ppm/rest/v1/projects/5001000
Every REST endpoint is authenticated so in python you will also have to handle that. Clarity supports BASIC and BEARER (token) authentication.
https://techdocs.broadcom.com/us/en/ca-enterprise-software/business-management/clarity-project-and-portfolio-management-ppm-on-premise/16-1-0/reference/Clarity-REST-APIs/REST-API-Authentication.html
If you are trying to learn the REST, Clarity's REST API and python all at the same time maybe you should remove some of the variability and try one at a time.