Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

Script endpoint

Answered

Comments

1 comment

  • Norman
    • Network Optix team

    Hi Mohammed,

    With the GET /rest/v3/servers/{id}/scripts request, you can list all files in the scripts folder. 

    This scripts directory needs to be created at the following location: 

    For Windows: 

    C:\Windows\System32\config\systemprofile\AppData\Local\Network Optix\Network Optix Media Server\

    Like so: 

    C:\Windows\System32\config\systemprofile\AppData\Local\Network Optix\Network Optix Media Server\scripts\

    For Linux: 

    /opt/networkoptix/mediaserver/var/

    Like so: 

    C:\Windows\System32\config\systemprofile\AppData\Local\Network Optix\Network Optix Media Server\scripts\

    In this directory, you can upload the desired bat or bash scripts. 

    With the POST /rest/v3/servers/{id}/scripts/{name}/run request, you can execute the scripts in the scripts directory. 

    For example: 

    POST https://localhost:7001/rest/v3/servers/this/scripts/helloworld.sh/run

    A few notes; 

    These scripts should be executable by the networkoptix user.
    Please note that this networkoptix user operates as a headless server account, so keep that in mind when designing and implementing scripts.

    With kind regards. 

    0

Please sign in to leave a comment.