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.
REST API PATCH Method not allowed
Moderators: Developer, Contributor
Re: REST API PATCH Method not allowed
Updating issue using PATCH method is supported starting from version 2.8.0, see https://www.mantisbt.org/bugs/view.php?id=23396
I recommend to update to latest Mantis version (2.18.0 at the moment) as there are some more fixes and additions related to REST in it.
I recommend to update to latest Mantis version (2.18.0 at the moment) as there are some more fixes and additions related to REST in it.
-
- Posts: 3
- Joined: 02 Dec 2018, 06:04
Re: REST API PATCH Method not allowed
Thank you for the quick reply, I will work on upgrading.
If you may, I have one more question, currently in my environment can I use the method GET for specific project by id?
I tried using the command "curl -k --request GET --url 'https://<my mantis link>/api/rest/projects/127' --header 'Authorization: <my token>' " but I get "Page Not Found" as result.
Thank you,
Efrat.
If you may, I have one more question, currently in my environment can I use the method GET for specific project by id?
I tried using the command "curl -k --request GET --url 'https://<my mantis link>/api/rest/projects/127' --header 'Authorization: <my token>' " but I get "Page Not Found" as result.
Thank you,
Efrat.
Re: REST API PATCH Method not allowed
Available starting from 2.14.0 https://www.mantisbt.org/bugs/view.php?id=24333
-
- Posts: 3
- Joined: 02 Dec 2018, 06:04
Re: REST API PATCH Method not allowed
Thank you
Re: REST API PATCH Method not allowed
Hi !
I am currently using the 2.22.1 mantisBT version.
I have the same problem of update, when I try to update an existing issue with the "PATCH" HTTP verb, I get an error telling me that "PATCH" is not allowed. The latest version is 2.24, should I upgrade in order to correct this bug or is there another way to do so ?
Thank you,
Potae
I am currently using the 2.22.1 mantisBT version.
I have the same problem of update, when I try to update an existing issue with the "PATCH" HTTP verb, I get an error telling me that "PATCH" is not allowed. The latest version is 2.24, should I upgrade in order to correct this bug or is there another way to do so ?
Thank you,
Potae