Patrik Boström edited a comment on New Feature JENKINS-8927

Found this by looking through the source code:
It is possible in Jenkins 1.509.4 to create views via the REST api

view.xml:

<?xml version="1.0" encoding="UTF-8"?>
<hudson.model.ListView>
<name>Hej</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
<jobNames>
<comparator class="hudson.util.CaseInsensitiveComparator"/>
</jobNames>
<jobFilters/>
<columns>
<hudson.views.StatusColumn/>
<hudson.views.WeatherColumn/>
<hudson.views.JobColumn/>
<hudson.views.LastSuccessColumn/>
<hudson.views.LastFailureColumn/>
<hudson.views.LastDurationColumn/>
<hudson.views.BuildButtonColumn/>
</columns>
</hudson.model.ListView>


Create the view:

curl -vvv -X POST -d @view.xml -H "Content-Type: text/xml" http://localhost:8080/jenkins/createView?name=Pipe2

Get the configuration:

curl http://localhost:8080/jenkins/view/Pipe1/config.xml

Update the view:

curl -X POST -d @view.xml -H "Content-Type: text/xml" http://localhost:8080/jenkins/view/Pipe1/config.xml
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to