View Issue Details

IDProjectCategoryView StatusLast Update
0030200mantisbtapi restpublic2022-05-12 07:48
Reporterciaras.wyatt Assigned To 
Status feedbackResolutionopen 
Product Version2.25.2 
Summary0030200: REST API - Internal Server Error

I am trying to request data from the REST API using the Python Requests module. I have an API token in place that I generated from Mantis.

Every time I try and get data from the API I get this response.

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Additional Information

The code I am running is below:

import requests
url_root = "http://XXXXX.XXXXX.XXXXX/"
url_ext_api = "api/rest/"

url_get = url_root + url_ext_api

r = requests.get(url_get, headers={'Authorization' : api_token})

TagsNo tags attached.




2022-05-12 07:48

developer   ~0066565

Your code should be fine (assuming url_ext_api is actually set to a valid endpoint, e.g. /api/rest/issues; / is not a valid endpoint. See the documentation for more information).

HTTP 500 error denotes a problem with your MantisBT server, which can't be diagnosed with the given information. Check the PHP error log on your server to find out what is wrong.