Best Practice For Using Jenkins REST API

Issue

Best Practice For Using Jenkins REST API

Environment

CloudBees Jenkins Enterprise

CloudBees Jenkins Operations Center

Resolution

The Jenkins REST API should never be used without the tree parameter. Using the Jenkins REST API
without the tree parameter, making a call to /api/json for example will run. However, making a call
to /api/json will cause Jenkins by default to respond with some rather arbitrary collection of data,
some of which might not be used and which may be work to compute. The practice of making /api/json
calls can cause poor performance issues and high CPU issues.

More information about the tree parameter can be found here:

JENKINS_URL/api

Taming Jenkins JSON API Blog Post

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.