How to get detailed change list via the json api

42 views
Skip to first unread message

Brent Scriver

unread,
Apr 30, 2015, 9:58:22 PM4/30/15
to jenkins...@googlegroups.com

Hi all,

I can currently get some information for the changeSet of a job using:
    http://<jenkins>/job/<jobname>/<jobid>/api/json 

However this is not the entire set of change information (such as the edit type (add, edit, delete), and the perforce revision of the file).

There is additional information provided by:
    http://<jenkins>/job/<jobname>/<jobid>/changes

that I have been unsuccessful at trying to acquire from the api/json data.
What I've tried:
* changes/api/json
* api/json/changes
* api/json/?depth=# for various #
* api/json/?tree=changeSet[*[*]]

Is there a a simple way to get the extended information?

Thank you,
Brent

Daniel Beck

unread,
May 1, 2015, 5:56:23 AM5/1/15
to jenkins...@googlegroups.com
Edit type is not made available through the API.

http://javadoc.jenkins-ci.org/hudson/scm/ChangeLogSet.Entry.html

It's the difference between getAffectedFiles (which has the information) and getAffectedPaths (which is made available to the API).
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/67f3ef3b-a54c-4e55-ac35-51a9e0ee6308%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages