how to create new system/account for admin in the Meta Server via terminal/CLI

Answered

Comments

10 comments

  • Avatar
    Andrey Terentyev

    Hello,

    You can use the  /ec2/saveUser API function for that.

    0
    Comment actions Permalink
  • Avatar
    SHANMUGARAJ K

    Andrey Terentyev, This API requires Admin permission, I still did not setup the admin, how to setup or configure the server for the admin?

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Ok, I got you.

    To configure a just installed system, you need to invoke the /api/setupLocalSystem API.

    Default credentials are admin/admin

    The JSON to be passed is similar to this one

    { 
    "password":"your admin new password ",
    "systemName":"the name of your system",
    }
    0
    Comment actions Permalink
  • Avatar
    SHANMUGARAJ K

    Andrey Terentyev, Thanks for the answer, I am getting in the way

    I installed the NX Meta Server and Client, then I started the testcamera app using a video,

    Then, I used Python to setup the localsystem using API -

    import requests

    r = requests.post("http://localhost:7001/api/setupLocalSystem", json={"password":"nx_server_pass","systemName":"user123"})

    But, it throws error Max retries exceeded with url: /api/setupLocalSystem (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0e347f3100>: Failed to establish a new connection: [Errno 111] Connection refused'

    Is this because that the localhost is http instead of https?

    Do you know about this issue, thank you 

     

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    SHANMUGARAJ,

    1. You should use HTTPS.

    2. You don't provide auth information in your requests.post function.
    In this case, API request to the Server has be authenticated with the default credentials.

     

    0
    Comment actions Permalink
  • Avatar
    SHANMUGARAJ K

    Andrey Terentyev

    Thanks for your answer, 

    I am still getting the same error, I will check on code side, 

    Is this way of installing and setup the admin account is correct? - 

    Installing NX Meta Server and Client, then I started the test camera app using a video,

    Then, using API - /api/setupLocalSystem helps to setup the local system.

    Or, Is there anything missing  like starting the NX Meta Server in Ubuntu with some commands?

    I am really appreciate your help, thank you

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    SHANMUGARAJ K , 

    The procedure is the following:

    1. Install VMS.

    The Server process start automatically after the installation.

    2. Configure the System with api/setupLocalSystem with default credentials.

    3. Apply licenses (if you need to) with /api/activateLicense

    JSON example

    {
    "licenseKey": "XXXX-YYYY-ZZZZ-FFFF"
    }

    4. Start the test camera
    The Server will discover and add test cameras automatically.

    5. Do your things

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    SHANMUGARAJ K, 

    Could you please explain your scenarios with more details? What is the objective? What is the expected final result?

    Could you share your code, please? Just place an archive to Google Drive or similar and post the link in this thread.

    0
    Comment actions Permalink
  • Avatar
    SHANMUGARAJ K

    l am trying to run testcamera in a ubuntu server, is the steps are correct, 

    thanks

    0
    Comment actions Permalink
  • Avatar
    Norman - Nx Support

    Hi SHANMUGARAJ K,

    After the Nx mediaserver is running, the test camera emulator is started, the generated test cameras are added through the auto-discovery, which is enabled by default, you start the Nx Desktop client and login with the credentials you used when you created the system. When you're logged in, the test cameras should be available and can be added to the layout, recorded, etc.

    0
    Comment actions Permalink

Please sign in to leave a comment.