How do you call the Jenkins REST API?
BeginnerConceptArchitecture, executors & JENKINS_HOME
Answer
Append /api/json (or /api/xml) to almost any URL, and use the tree parameter to limit fields. POST requests need an API token (which bypasses the CSRF crumb) or a crumb with a session.
curl -s -u alice:$TOKEN "https://jenkins/job/app/job/main/lastBuild/api/json?tree=result,number,duration"
curl -X POST -u alice:$TOKEN "https://jenkins/job/deploy/buildWithParameters?ENV=dev"
curl -s -u alice:$TOKEN "https://jenkins/job/app/job/main/42/consoleText"
More on Architecture, executors & JENKINS_HOME
What are the main components of a Jenkins installation?BeginnerWhat is the difference between a node, an agent and an executor?BeginnerWhy should the built-in node have 0 executors?BeginnerWhat is `JENKINS_HOME` and what are its most important contents?BeginnerWhat happens if you lose the `secrets/` directory but keep `credentials.xml`?AdvancedHow does an agent communicate with the controller?Intermediate