Script endpoint
AnsweredHi,
I am looking for some extra doc on the /rest/v4/servers/{id}/scripts endpoints both Get and Execute and how to use them.
Thanks in advance.
-
Hi Mohammed,
With the
GET /rest/v3/servers/{id}/scriptsrequest, 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}/runrequest, you can execute the scripts in the scripts directory.For example:
POST https://localhost:7001/rest/v3/servers/this/scripts/helloworld.sh/runA few notes;
These scripts should be executable by the
networkoptixuser.
Please note that thisnetworkoptixuser 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.
Comments
1 comment