DX Unified Infrastructure Management

  • 1.  How to Login by usingRest API

    Posted Sep 20, 2013 11:42 AM
    Hi All, Any one used REST API to get details or did query to get details from Nimsoft Server ? please let me know the steps, how to use RESTful api of Nimsoft. Thanks in advance.


  • 2.  Re: How to Login by usingRest API

    Posted Sep 20, 2013 01:58 PM

    Hi,

     

    It depends on the language you're using, as there are often libraries to help you. Here's a quick example using Perl:

     

    #!/usr/bin/perl
    use REST::Client;
    use strict;
    use MIME::Base64;
    
    my $auth_string = "user:word";
    
    my $client = REST::Client->new();
    
    $client->setHost("http://fihkisrv01/rest");
    $client->addHeader( "Authorization", "Basic ".encode_base64($auth_string));
    #$client->GET('/hubs');
    
    print $client->responseContent();
    

     

    -jon