-
Improvement
-
Resolution: Fixed
-
Major
-
None
Using .../api/xml?depth=...&exclude=//... has proven to be extremely inefficient in some cases, as well as difficult to use (since you have to constantly be adding exclusions for newly visible elements you have no interest in). Here is a typical negative list:
...&exclude=//view/job/url&exclude=//view/job/color&exclude=//description&exclude=//job/build&exclude=//healthReport&exclude=//firstBuild&exclude=//keepDependencies&exclude=//nextBuildNumber&exclude=//property&exclude=//action&exclude=//upstreamProject&exclude=//downstreamProject&exclude=//queueItem&exclude=//scm
Would prefer to be able to directly specify the kinds of things you do want to have returned. This would mean changes to Stapler.
For example:
.../api/xml?paths=job/name,job/displayName,job/color,view/name,view/job/name
would return only elements matching //job/name, //job/displayName, etc. (The root element need not be listed.)
Alternate syntax (harder to parse by Hudson but arguably easier to read):
.../api/xml?paths=job[name,displayName,color],view[name,job[name]]
Might be feasible to do for JSON and Python formats as well as XML, which would also be nice since those lack XPath support.