Delete an issue using rest api

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
mike92117
Posts: 1
Joined: 14 Oct 2021, 19:09

Delete an issue using rest api

Post by mike92117 »

I have been testing out the rest api using POSTMAN. My particular mantis install is on version 2.24.2 (latest version is 2.25.2). So I'm nearly up-to-date.
My installation is Windows (IIS).

I have found the calls using the GET verb work just fine. For example, Get all issues, Get an issue both work perfectly.

But Delete an Issue fails and the response is "405 - HTTP verb used to access this page is not allowed." I have the verb set to DELETE. I've checked IIS settings, PHP settings and don't see any place where this is disallowed.

Any ideas as to what is preventing this call from proceeding?
obmsch
Posts: 26
Joined: 26 Mar 2013, 22:19

Re: Delete an issue using rest api

Post by obmsch »

By default, IIS configures PHP only to accept GET, POST and HEAD requests. You have to enable others by adding them to the handler.
In IIS Manager open 'Handler Mappings', edit your '*.php' handler -> 'Request Restrictions...' and than on the Verbs-Tab, you either
check 'All verbs' or put a list of the verbs you wish to allow in the box for the other option. Save (Ok, Ok).
Post Reply