REST API PATCH Method not allowed
Posted: 02 Dec 2018, 06:19
Hello,
Well, till now I was using SOAP in all my scripts but I want to move to REST since I understand this it a better way to work. When I try to use the PATCH option to update an existing issues I get this message: "Method not allowed. Must be one of: GET, POST, DELETE"
I'm using mantis 2.7.0 schema 209
I have $g_webservice_rest_enabled = ON; in my config file and generated a Token.
I succeeded to get the GET for specific issue or for all projects to work so far, also DELETE and POST.
the command I'm using is:
curl -k --request PATCH --url 'https://<my mantis link>/api/rest/issues/' --header 'Authorization: <my token>' --header 'Content-Type: application/json' --data '{"id": 38050, "summary": "test1", "status": {"id": 50,"name": "assigned"}}'
Please advise,
Efrat.
Well, till now I was using SOAP in all my scripts but I want to move to REST since I understand this it a better way to work. When I try to use the PATCH option to update an existing issues I get this message: "Method not allowed. Must be one of: GET, POST, DELETE"
I'm using mantis 2.7.0 schema 209
I have $g_webservice_rest_enabled = ON; in my config file and generated a Token.
I succeeded to get the GET for specific issue or for all projects to work so far, also DELETE and POST.
the command I'm using is:
curl -k --request PATCH --url 'https://<my mantis link>/api/rest/issues/' --header 'Authorization: <my token>' --header 'Content-Type: application/json' --data '{"id": 38050, "summary": "test1", "status": {"id": 50,"name": "assigned"}}'
Please advise,
Efrat.