Project

General

Profile

Actions

Defect #36542

closed

projects.xml API doens't include closed projects since redmine v4.1

Added by Christoph Klaffl almost 3 years ago. Updated about 2 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

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


Related issues

Related to Redmine - Feature #29482: Query system for Projects pageClosedJean-Philippe Lang

Actions
Actions #1

Updated by Mizuki ISHIKAWA almost 3 years 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)
There is a workaround, but I think the problem that the document(Rest_Projects) is not updated even though the specifications of the project API have changed significantly needs to be improved.
  • Add a method for adding filter conditions
  • Add a description that previously included projects that were closed by default, but are no longer included
Actions #2

Updated by Christoph Klaffl almost 3 years ago

Using

https://<Redmine url>/projects.xml?f[]=status&op[status]==&v[status][]=1&v[status][]=5&key=<API key>

works. Thank you!

Actions #3

Updated by Holger Just over 2 years ago

Actions #4

Updated by Holger Just over 2 years ago

You can also override the default status filter with en empty filter value to get a list of all projects (open, closed or archived):

GET /projects.xml?status=

To get only open or closed projects, you can also use the following short filter to get open projects (status = 1) or closed projects (status = 5):

GET /projects.xml?status=1|5
Actions #5

Updated by Marius BÄ‚LTEANU about 2 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed
Actions

Also available in: Atom PDF