The Jenkins Python API is different from the JSON API

Source: Internet
Author: User

Look at Jenkins's Python API and JSON API, feeling that the difference is not much, but there is a difference, so use beyondcompare for comparative analysis.

1, the Jenkins base URL API comparison

To the left: http://server:port/jenkins/api/python?pretty=true

To the right: http://server:port/jenkins/api/json?pretty=true

2. Jenkins Job API Comparison

To the left: http://server:port/jenkins/job/JOB_NAME/api/python?pretty=true

To the right: http://server:port/jenkins/job/JOB_NAME/api/json?pretty=true

3. Jenkins Build API Comparison

To the left: http://server:port/jenkins/job/JOB_NAME/BUILD_NUMBER/api/python?pretty=true

To the right: http://server:port/jenkins/job/JOB_NAME/BUILD_NUMBER/api/json?pretty=true

4. Jenkins View API Comparison

To the left: http://server:port/jenkins/view/VIEW_NAME/api/python?pretty=true

To the right: http://server:port/jenkins/view/VIEW_NAME/api/json?pretty=true

5. Jenkins nodes API comparison

To the left: http://server:port/jenkins/computer/api/python?pretty=true

To the right: http://server:port/jenkins/computer/api/json?pretty=true

Different from the above API, you can see that Python and JSON (JAVASCRIPT) syntax differ in two ways:

* Python has a Boolean value of: True/false;json the value of the Boolean type is: True/false

* The null value for Python is: null for None;json


The Jenkins Python API is different from the JSON API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.