Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


API Sample Code


JSA API samples are stored in a GitHub repository for each version of JSA. As new versions of JSA are released, a new link is posted with code samples to help customers use APIs and features.

The samples are provided for educational use. When you download the code samples, you are presented with theJuniper Networks developerWorks terms of use. Read the terms of use before you download the code samples. You must agree to the terms to download the files.

What Are the Requirements to Run the Code Samples?

The sample scripts that you download are designed to work the relevant JSA version. For example, samples for JSA 7.2.1 must be used with JSA 7.2.1 only.

API sample scripts that are downloaded from the GitHub page must not run directly on a JSA appliance. They are intended to run on an external host that polls data from JSA.

External hosts must use Python 3.3 to run the code samples. JSA does not run Python 3.3. JSA cannot be upgraded to Python 3.3. Do not install RPMs on your JSA console unless the files come from IBM Fix Central.

You can verify the software version on the Console from the Dashboard tab, by selecting the Help >About. Download the appropriate code samples for the JSA version. A branch is created for each JSA version in Github, and you can download the specific branch for your JSA version.