Project

General

Profile

Actions

Defect #31028

open

Get 200 response even when specifying an id value that does not exist.

Added by ume san about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

At Redmine 4.0.1,
I get 422 response when specifying an id value that does not exist in 'assigned_to_id'
However I get 200 response even when specifying an id value that does not exist in 'project_id, tracker_id, status_id, priority_id, category_id, fixed_version_id'.

At Redmine 3.4.6,
I got 422 response when specifying an id value that does not exist in 'priority_id'

---
issue.xml

<?xml version="1.0"?>
<issue>
        <project_id>99999</project_id>
        <tracker_id>99999</tracker_id>
        <status_id>99999</status_id>
        <priority_id>99999</priority_id>
        <category_id>99999</category_id>
        <fixed_version_id>99999</fixed_version_id>
</issue>
curl -v -H "Content-Type: application/xml" -X PUT --data-binary "@issue.xml" -H "X-Redmine-API-Key: xxx" [URL]/issues/[id].xml

HTTP/1.1 200 OK

I expect to get 422 response when specifying an id value that does not exist in 'project_id, tracker_id, status_id, priority_id, category_id, fixed_version_id'.

Actions #1

Updated by ume san about 5 years ago

#19276 may also be related

Actions #2

Updated by ume san about 5 years ago

I checked again with Redmine 4.0.2.
I got 422 response when specifying an id value that does not exist in 'priority_id'
I got 200 response even when specifying an id value that does not exist in 'project_id, tracker_id, status_id, category_id, fixed_version_id'.

Actions

Also available in: Atom PDF