Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[NSM API] How to login to the NSM API server



Article ID: KB12930 KB Last Updated: 05 Jul 2010Version: 4.0
NSM2008.1r1 introduced a new Simple Object Access Protocol (SOAP) API functionality.  Once the client environment is installed and verified, the next step is to test that the client can log in succesfully to the NSM server.

This article provides a script example to login to the NSM server via the API interface.


This script can be used to test connectivity and proper credentials.  It's available here


  1. Edit the script and change the lines below to set your NSM server IP (or IPs), the user and the password
    our @NSM_SERVERS = qw(
    our $USERNAME="super";
    our $PASSWORD="netscreen";
  2. Execute the script:
    # perl
  3. Check the output
    This is the output of a successful authentication:

    # perl
    Login OK

    Authentication Token: 39faf4e6-d45c-42d2-84b9-a7164bad7fea

    The script gives different errors if the NSM server is not reachable or if the authentication fails.

At this point the client environment is installed and the login is tested successfully.   It is recommended to proceed KB12937 to study the API sample scripts provided.

In case of problem consult KB12931 - [NSM API] Common problems and troubleshooting

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search