Defect #36542
projects.xml API doens't include closed projects since redmine v4.1
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | REST API | |||
Target version: | - | |||
Resolution: | Affected version: | 4.2.3 |
Description
Before redmine v4.1 the /projects.xml API returned active and closed projects.
With v4.1 and upwards only active projects are returned and there isn't an option to include them (as far as I can read from the corresponding src file).
It seems the change happened with this commit: https://github.com/redmine/redmine/commit/6c5440a21b491982c02531c82b4416ef212eb3dc
History
#1
Updated by Mizuki ISHIKAWA 5 months ago
I have described three ways to get information about status closed (id: 5). Could you please try with this?
- Save a custom query configured to include the closed project and set its query.
http://<Redmine url>/projects?query_id=<query id>&key=<API key>
http://<Redmine url>/projects.xml?f[]=status&op[status]==&v[status][]=1&v[status][]=5&key=<API key>
http://<Redmine url>/projects.xml?status=5&key=<API key>
results(closed projects) +http://<Redmine url>/projects.xml?status=1&key=<API key>
results(open projects)
- Add a method for adding filter conditions
- Add a description that previously included projects that were closed by default, but are no longer included
#2
Updated by Christoph Klaffl 5 months ago
Using
https://<Redmine url>/projects.xml?f[]=status&op[status]==&v[status][]=1&v[status][]=5&key=<API key>
works. Thank you!