How to filter Redmine issues to only include specified columns, when using the REST API xml/json format?
I have a custom query to obtain specific columns of issues:
Filter set to "status(open)" and "Due Date(any)"
Options / Selected Columns set to "Due Date" (To only return the ID and the Due Date in the response)
These are two ways of accessing it:
A /issues?query_id=myqueryid
B /issues.xml?query_id=myqueryid
When i run A in my browser, the correct response is given, containing only the id and the due date. In contrast to B, now every field (ie. id, description, start date,...) is included in the response.
I also tried to add a "fields" value as some other apis suggest, but to no avail (ie. /issues.xml?issue_id=1337&fields=due_date,etc).
Redmine's REST API (i.e. the JSON and XML APIs) always returns all base fields of filtered issues. You can optionally include additional fields like watchers, journals, issue relations, ... by using the include
mechanism describe in the API docs
When using the API, the client is supposed to fetch any fields it desires from the response on their own. The feature to show a tailored HTML table with selected columns as done in the web UI is considered not very useful for the API use-case right now.