The API respond "403 Forbiden" on "api/tracker_reports" requests, when the project is not public. (my user have the sufficient rights to access the project, and to visualize the report).
Here is a python script that reproduce the problem :
import requests
import json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
## Get a token
# POST /api/tokens
r = requests.post("https://_my_server_/api/tokens", data={'username':'_my_user_name_', 'password':'_my_password_'}, verify=False)
j = json.loads(r.content.decode("utf-8") )
r = requests.get("https://sds-0lyg.wks.era.sds.safran/api/tracker_reports/231",
params={
'X-Auth-Token':j['token'],
'X-Auth-UserId':j['user_id']
},
data={},
verify=False)
data = json.loads(r.content.decode("utf-8") )
print(data)
When the project is public, the answer is :
{u'label': u'SR', u'id': 231, u'resources': [{u'type': u'artifacts', u'uri': u'tracker_reports/231/artifacts'}], u'uri': u'tracker_reports/231'}
But when the project is private :
{u'error': {u'message': u'Forbidden', u'code': 403}}
Used version : 0:1.0-9.11.99.147_1.el6