You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require 'jenkins_api_client'
begin
@client = JenkinsApi::Client.new(:server_ip => 'jenkins.example.com',:server_port => '443',:username => 'user',:password => 'password',:log_level => 0,:ssl => true)
puts @client.job.list_all
rescue Exception => e
puts e.message
end
produces:
D, [2017-09-15T08:18:18.546154 #32469] DEBUG -- : GET /api/json?tree=jobs[name]
D, [2017-09-15T08:18:19.272611 #32469] DEBUG -- : HTTP Code: 404, Response Body:
E, [2017-09-15T08:18:19.272756 #32469] ERROR -- : JenkinsApi::Exceptions::NotFound: Requested component is not found on the Jenkins CI server.
Yet I can do:
curl -X GET -u 'user:password' "https://jenkins.example.com/api/json?tree=jobs\[name\]" | python -m json.tool
Hey @andrew80k - I can't duplicate this locally. Both commands get me the same result, which is listing my jobs. This could be related to the fact that jenkins_api_client right now doesn't fully support the folders plugin by CloudBees. We have some in-progress issues dealing with this and it is planned for future functionality, but I'm not sure when.
produces:
Yet I can do:
And get:
Jenkins version is:
I have been writing a barebones ruby interface for the last day or so, but REALLY don't want to do that.
I assume something is getting mangled, but can't figure out what it is. Any assistance/advice would be appreciated.
The text was updated successfully, but these errors were encountered: