[JIRA] Created: (JENKINS-9264) Create a new job into a view via REST API

191 views
Skip to first unread message

dmatag@java.net (JIRA)

unread,
Apr 6, 2011, 8:17:24 AM4/6/11
to jenkinsc...@googlegroups.com
Create a new job into a view via REST API
-----------------------------------------

Key: JENKINS-9264
URL: http://issues.jenkins-ci.org/browse/JENKINS-9264
Project: Jenkins
Issue Type: Improvement
Components: nested-view
Reporter: dmatag


Create a new job in a view using REST API, like /createItem.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


simon.endele@gmail.com (JIRA)

unread,
Jul 24, 2012, 8:57:22 AM7/24/12
to jenkinsc...@googlegroups.com
Simon Endele commented on Improvement JENKINS-9264

I think, it would be ok, to be able to add an existing job to an existing view.

Actually this can be done like follows:
wget --post-data='name=ViewX&JobX=on&json={"name": "ViewX", "JobX": true}' http://.../jenkins/view/ViewX/configSubmit

But the problem is, that all other options are deleted (other assigned jobs, columns etc.).

I suggest to fix this and leave unspecified options unchanged.
Additionally the necessity to specify all options twice (see JENKINS-8927) should be removed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

simon.endele@gmail.com (JIRA)

unread,
Aug 7, 2012, 12:11:04 PM8/7/12
to jenkinsc...@googlegroups.com
Simon Endele commented on Improvement JENKINS-9264

Found out how to achieve this: Instead of using /jenkins/createItem (as mentioned in the documentation), one can simply post a new job to /jenkins/view/myViewName/createItem (where myViewName is an existing view). Or in detail:

wget --post-file=config.xml --header='Content-type: application/xml; charset=ISO-8859-1' http://.../jenkins/view/myViewName/createItem?name=newJobName

Maybe this should be mentioned in the small Remote API Documentation reachable at /jenkins/api/ in every Jenkins installation, as it seems to work perfekt without any side effects.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

dmatag@gmail.com (JIRA)

unread,
Nov 7, 2012, 8:16:41 AM11/7/12
to jenkinsc...@googlegroups.com
dmatag commented on Improvement JENKINS-9264

I think this could be closed. May I?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

ruediger.dohna@1und1.de (JIRA)

unread,
Nov 7, 2012, 9:31:41 AM11/7/12
to jenkinsc...@googlegroups.com

closing, eh? at least the docu should be fixed, no?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
Reply all
Reply to author
Forward
0 new messages