-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Poly Video Conferencing
- Webcams
- Script for EagleEye Director

Create an account on the HP Community to personalize your profile and ask a question

12-27-2022 01:26 AM
Hello !
I would like to do a script to reboot the eagleeye director, I found one for X50/G7500... that works perfectly so i changed it a little, but it has no effect on camera.
Could you confirm?
#BEGIN POWERSHELL SCRIPT FOR POLY EagleEye Director REST command
$password = "1234567" #your password
$IP = "10.35.114.88" #IP of unit
#URL to make new session
$sessionURL = ("https://" + $IP + "/api/restartSystem");
#Command to make new session
$sessionBody = "{`"user`": `"admin`",`"password`": `"" + $password + "`"}"
#URL to issue reboot
$rebootURL = ("https://" + $IP + "/api/restartSystem");
#Command to issue reboot
$rebootBody = "{`"action`": `"reboot`"}"
# disable self signed certificate check
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type)
{
$certCallback = @"
using System;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public class ServerCertificateValidationCallback
{
public static void Ignore()
{
if(ServicePointManager.ServerCertificateValidationCallback ==null)
{
ServicePointManager.ServerCertificateValidationCallback +=
delegate
(
Object obj,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors errors
)
{
return true;
};
}
}
}
"@
Add-Type $certCallback
}
[ServerCertificateValidationCallback]::Ignore()
# End self signed certificate commands
Invoke-WebRequest $sessionURL -ContentType "application/json" -Method Post -body $sessionBody -SessionVariable sess;
Invoke-WebRequest $rebootURL -ContentType "application/json" -Method Post -WebSession $sess -Body $rebootBody
regards
12-27-2022 04:08 AM
Hello @lotfi
welcome back to the Poly community,
I do not believe there is a documented REST API for the EagleEye director camera
Best Regads
Steffen Baier
Notice: I am an HP Poly employee but all replies within the community are done as a volunteer outside of my day role. This community forum is not an official HP Poly support resource, thus responses from HP Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
If you need immediate and/or official assistance for former Poly\Plantronics\Polycom please open a service ticket through your support channels
For HP products please check HP Support.
Please also ensure you always check the General VoIP , Video Endpoint , UC Platform (Microsoft) , PSTN

12-27-2022 06:37 AM
Hi Steffen
There is a doc API for this but i do not understand it:
I found the script for Poly X in this community. But nothing for camera
regards
01-06-2023 09:49 AM
Hello @lotfi
Welcome back to the Poly community and for correcting me on the REST API for EagelEye Director.
Is this an EagleEye Director II ?
Looking at your script you are not using the correct API to log in first to the unit. You are also not using a SHA1 encrypted Password.
A working script with a hardcoded password 789 converted into SHA1 is:
#BEGIN POWERSHELL SCRIPT FOR REBOOTING Poly EagleEye Director II camera command
#The password needs to be SHA1 encrypted http://www.sha1-online.com/
#The HASH must be all lower case
#In this test script we encoded 789 into SHA1
$password = "fc1200c7a7aa52109d762a9f005b149abef01479" #your password
$IP = "192.168.0.147" #IP of unit
#URL to make new session
$sessionURL = ("https://" + $IP + "/api/login");
#Command to make new session
$sessionBody = "{`"username`": `"admin`",`"password`": `"" + $password + "`"}"
#URL to issue reboot
$rebootURL = ("https://" + $IP + "/api/restartSystem");
# disable self signed certificate check
if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type)
{
$certCallback = @"
using System;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public class ServerCertificateValidationCallback
{
public static void Ignore()
{
if(ServicePointManager.ServerCertificateValidationCallback ==null)
{
ServicePointManager.ServerCertificateValidationCallback +=
delegate
(
Object obj,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors errors
)
{
return true;
};
}
}
}
"@
Add-Type $certCallback
}
[ServerCertificateValidationCallback]::Ignore()
# End self signed certificate commands
Invoke-WebRequest -UseBasicParsing $sessionURL -ContentType "application/json" -Method Post -body $sessionBody -SessionVariable sess;
Invoke-WebRequest -UseBasicParsing $rebootURL -ContentType "application/json" -Method Post -WebSession $sess -Body $rebootBody
A much simpler CURL example:
curl -b cookies.txt -c cookies.txt -X POST -d "{\"username\": \"admin\",\"password\": \"fc1200c7a7aa52109d762a9f005b149abef01479\"}" -H "Content-Type: application/json" -k https://192.168.0.147/api/login
curl -b cookies.txt -c cookies.txt -X POST -H "Content-Type: application/json" -k https://192.168.0.147/api/restartSystem
Best Regards
Steffen Baier
Notice: I am an HP Poly employee but all replies within the community are done as a volunteer outside of my day role. This community forum is not an official HP Poly support resource, thus responses from HP Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
If you need immediate and/or official assistance for former Poly\Plantronics\Polycom please open a service ticket through your support channels
For HP products please check HP Support.
Please also ensure you always check the General VoIP , Video Endpoint , UC Platform (Microsoft) , PSTN