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()) {
println(nodes.getNodeName())
}
Which returns a list of node names for the entire Jenkins instance.
I want to do the same thing with something like:
curl -X get http://<jenkins-endpoint>/nodes/api/json -d json
Does the Jenkins API allow for that or can I only interact with jobs as shown in the link below? https://www.jenkins.io/doc/book/using/remote-access-api/