Project

General

Profile

REST API POST issue is succesfull but returns 404

Added by Adam Mrkvicka 1 day ago

Hello everyone,

I am trying to create an issue via REST API on my instance running on OpenSUSE 15.6 with apache server.I have tried on Redmine 6.0.4 and also after upgrading to 6.1.0. I am using postres 16.8 and ruby 3.3.7.

When I POST request to create issue at /issues.json or /issues.xml (tried both):

<?xml version="1.0" encoding="UTF-8" ?>
<issue>
    <project_id>18</project_id>
    <tracker_id>7</tracker_id>
    <status_id>4</status_id>
    <subject>my subject</subject>
    <description>my description</description>
</issue>

or

{
    "issue": {
        "project_id": 18,
        "tracker_id": 7,
        "status_id": 4,
        "subject": "my subject",
        "description": "my description" 
    }
}

The issue is created in redmine, however I get 404 response:

HTTP/1.1 404 Not Found
Date: Mon, 17 Nov 2025 09:46:11 GMT
Server: Apache
cache-control: no-cache
referrer-policy: strict-origin-when-cross-origin
x-permitted-cross-domain-policies: none
x-xss-protection: 1; mode=block
x-request-id: dcef2c3b-af3a-45ec-9c1b-e1396ca477da
x-download-options: noopen
x-runtime: 0.041144
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
X-Powered-By: Phusion Passenger(R) 6.0.17
content-length: 0
Status: 404 Not Found
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/json

I have seen it was discussed on stackoverflow: https://stackoverflow.com/questions/79652789/redmine-rest-api-works-but-returns-404-http-error

Is there something I am doing wrong or is it a BUG?

Thanks for help.
Adam


Replies (1)

RE: REST API POST issue is succesfull but returns 404 - Added by Holger Just about 11 hours ago

One reason Redmine returns a 404 is if it can not find a required database row while processing the request. If you are using any plugins, it may be that one of these has hooked into the process to create issues and tries to post-process something, which may fail in this case. If the plugin does not properly handles this error, it may result in a 404 even though the actual issue was (mostly) created before.

Check the logs of your Redmine server in logs/production.log for the request you are making. It likely contains additional details about the issue. It may also help to (temporarily) remove all plugins from your Redmine to pinpoint which is responsible.

    (1-1/1)