Questions tagged [jenkins-api]

Jenkins provides an API that allows you to access Jenkins via REST (see http://localhost:8080/api/ of a running Jenkins) to retrieve information or interact with Jenkins.

Jenkins provides an API that allows you to access Jenkins via REST (see http://localhost:8080/api/ of a running Jenkins) to retrieve information or interact with Jenkins.

181 questions
0
votes
0 answers

Stop Jenkins job through REST API using token

I'm using token authentification to start jobs (because authentification would otherwise be complicated, due to our cloud security): curl -X POST <
Peter
  • 533
  • 1
  • 6
  • 17
0
votes
1 answer

Getting all build logs from Jenkins API

I need to get logs for all builds from a Jenkins instance. def get_builds(): builds_api_res = session.get('https://build.org.com/api/json?depth=3',stream=True,auth=(username,access_token),).json() for chunk in…
Abhishek Rai
  • 2,159
  • 3
  • 18
  • 38
0
votes
1 answer

Java return Inputstream via rest API with html file in inputstream

I am currently trying to return an input stream via my API. The input stream contains an html file that I previously fetch from Jenkins via the Cdancy Jenkinsclient via the input stream. I want to pass this html through my endpoint. If I enter Json…
0
votes
0 answers

Python Jenkins API returns error for get_build_info

I'm using this python jenkins API: https://python-jenkins.readthedocs.io/en/latest/api.html#jenkins.Jenkins.get_build_info but when I'm passing 'Job name' and 'Job ID' and get this error: KeyError: 'queuingDurationMillis' Jenkins 2.361.2 I couldn't…
arielma
  • 1,308
  • 1
  • 11
  • 29
0
votes
1 answer

Jenkins REST API: get specfic json element from the response

I want to just get the "value" field from the actions's parameters from response using the REST API: value" : "PROJECT.47" "value" : "PROJECT.54" I am using following query that gives me the first of the actions but can't just get the value…
DoThe New
  • 11
  • 2
0
votes
0 answers

Max retries exceeded with url: /api/json. Failed to establish a new connection: [Errno 111] Connection refused

I am using jenkins package of python to fetch job details from jenkins server. For most of the servers I am able to fetch the job data but for few servers I am getting below error. Unable to authenticate with any scheme: auth(kerberos)…
Nilesh
  • 69
  • 1
  • 11
0
votes
1 answer

Jenkins API xpath like functionality for JSON

I am trying to use the jenkins API to retrieve a list of running jobs buildURLs and this works with this the query https://jenkins.server.com/computer/api/xml?tree=computer[executors[currentExecutable[url]]]&depth=1&xpath=//url&wrapper=buildUrls By…
Froodle
  • 339
  • 2
  • 5
  • 15
0
votes
1 answer

JenkinAPI error with server.get_jobs "max retries exceeded with url"

From the beginning of the new year, i cannot extract jobs info from my Jenkins, using the classic example that can be found here:…
FraDV
  • 1
0
votes
0 answers

How to update Jenkins plugin update URL via python-jenkins api?

I am planning to update all Jenkins plugins URLs to point to an internal host instead of existing open source urls. I cannot find any function in python-jenkins API to do so. {'active': True, 'backupVersion': None, 'bundled': False, 'deleted':…
zester
  • 165
  • 3
  • 12
0
votes
1 answer

Jenkins API - 403 No valid crumb was included in the request

I am trying to create credentials via the Rest API using postman. I send the post request to this domain: http://localhost:8080/credentials/store/system/domain/_/createCredentials I've added a API-Key as authentification, created a crumb via the…
klukama
  • 25
  • 8
0
votes
1 answer

How to get the project status of a Jenkins multi-branch project?

It is possible to disable a multi-branch pipeline with: https://my.jenkins.net/job/my-project/disable It is possible enable a multi-branch pipeline with: https://my.jenkins.net/job/my-project/enable But I haven't found any API to get the actual…
user2668735
  • 1,048
  • 2
  • 18
  • 30
0
votes
1 answer

How to Do Jenkins Save/Apply event from script

I am using this https://python-jenkins.readthedocs.io/en/latest/ python Jenkins API to create a job from XML config. Everything working fine except the webhook for Bitbucket server. I need to hit save/apply button at least once to activate the…
0
votes
1 answer

How can I curl the names of all the nodes in a jenkins instance using the Jenkins API?

In the scripts console, i can get information on the nodes with a groovy script like: for (nodes in Jenkins.instance.getNodes()) { if (nodes.labelString=="") { println(nodes.getNodeName()) } } or for (nodes in Jenkins.instance.getNodes()) { …
Mark Wagner
  • 1,011
  • 6
  • 11
0
votes
1 answer

Jenkins Remove Item via curl with api

I am somewhat new to using API's. In the below question, the answer mentions using the http:///job//api url's instructions for deleting a job. This involved sending a POST request to http:///job//doDelete. When…
Matt Case
  • 3
  • 1
0
votes
1 answer

Jenkins-Rest - Connect to remote jenkins client

I have a scenario where I want to trigger Jenkins Build with parameters remotely. I am using following jar in my java code to connect to Jenkins: com.cdancy jenkins-rest
code-geek
  • 441
  • 1
  • 8
  • 22