We are trying to make a simple request to create an issue using Easy redmine api (this should be really simple) we have tried from postman and also within pycharm via python code, we always recieve a 200 with the list of issues, but no 201 with ok for creation.
It seems that it doesnt care if we use POST, PUT or GET methods it always returns a 200 with the list of issues. Because of this we discard a problem within the user permissions or connection.
As no error management its being done in the interface (API) and returned as response it´s not posible to identify if we have any xml problem.
enter code here
def create_issue():
url = "http://domain.easyredmine.com/issues.xml"
payload = ""
headers = {
'Content-Type': "application/xml",
'Authorization': "Basic @token=",
'Cache-Control': "no-cache",
'Postman-Token': "@postman_token"
}
try:
response = requests.request("POST", url, data=payload, headers=headers)
except Exception as e:
print("Error", e)
print(response.text)
XML data
<issue>
<project_id>test_01</project_id>
<status_id>1</status_id>
<priority_id>1</priority_id>
<author_id> @author</author_id>
<subject>issue subject</subject>
<description>
issue description
</description>
<start_date>2014-04-11</start_date>
<due_date>2014-04-11</due_date>
<estimated_hours>1.0</estimated_hours>
</issue>
As commented this should be really easy but we are hard stucked
Any help would be really appreciated
Thank you in advance.