expose NodeProperty extension data to computer REST API?

3 views
Skip to first unread message

jb

unread,
Oct 23, 2015, 4:27:23 PM10/23/15
to Jenkins Developers
I've got an extension to NodeProperty that contains data I'd like to expose on the node's REST API page, and I'm not sure how to go about doing it. It appears properly for the config.xml endpoint output, though.

My class:

  58 @ExportedBean
  59 public class FancyNewProperty extends NodeProperty <Slave> {
 ...
 765     @Exported(visibility=999)
 766     private HashMap<String, Object> policies = new HashMap<String, Object>();
 ...
1181     public Api getApi() { return new Api(this); }
1182
1183     @Exported
1184     public String getInfo() {
1185         return "JB INFO";
1186     }

However neither policies nor info show up in the JSON API output at http://myjenkins/computer/jb_test1/api/json.
Reply all
Reply to author
Forward
0 new messages