-
×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 Phones
- UC Platforms
- Re: REST API Getting Visual+ Box Connected

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

08-18-2021 10:34 AM
Hi Team!
I'm new here, so sorry if this is an old topic.
I started to create an script to collect the Content Box (Visual+) using the RESTAPI and PowerShell (Invoke-RestMethod)
I know that the information for the Visual+ will be at the "mr.pair.uid.1". but I could not find any URL that provides me this info...
Here is what I got so far:
$username = "Polycom"
$password = "0000" | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($username,$password)
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class IDontCarePolicy : ICertificatePolicy {
public IDontCarePolicy() {}
public bool CheckValidationResult(
ServicePoint sPoint, X509Certificate cert,
WebRequest wRequest, int certProb) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = new-object IDontCarePolicy
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls11
$IP = "172.16.182.127"
$Path = "api/v2/mgmt/device/info"
$URL = "http://$($IP)/$($Path)"
$InvokeData = Invoke-RestMethod -Method Get -Uri $URL -Credential $Cred
$data = $InvokeData.data
$data

09-01-2021 06:18 PM
It took some time but I got it 🙂
$IP = "10.1.1.36"
$PW = "0000"
$Config = "mr.pair.uid.1"
# Output Object
$Output = New-Object PSObject
$Password = $PW | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential("Polycom",$Password)
$URL = "http://$($IP)/api/v1/mgmt/config/get"
$Body = @{
"data" = @(
$Config
)
}
$Json = $Body | ConvertTo-Json
$Invoke = Invoke-RestMethod -Method Post -Uri $URL -Credential $cred -TimeoutSec 8 -Body $Json -ContentType "application/json" -ErrorAction SilentlyContinue
if($Invoke.InvalidParams -like $null){
$Output | Add-Member -type NoteProperty -name $Config -value (($Invoke.Data).$Config).Value
$Output | Add-Member -type NoteProperty -name "Source" -value (($Invoke.Data).$Config).Source
}
else{
$Output | Add-Member -type NoteProperty -name $Config -value "Invalid Config Parameter"
}
$Output
I hope that this helps others 🙂 🙂
I also removed the part for the HTTPS connection:
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class IDontCarePolicy : ICertificatePolicy {
public IDontCarePolicy() {}
public bool CheckValidationResult(
ServicePoint sPoint, X509Certificate cert,
WebRequest wRequest, int certProb) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = new-object IDontCarePolicy
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls11
09-10-2021 01:11 AM
Hello @Diego_A and all,
we figured out there is an actual REST API command to get this info.
Example for CURL:
curl -k -X GET -H "Content-Type: application/JSON" https://Polycom:789456@10.252.149.59/api/v1/mgmt/mrpair/info
The above will respond with:
{"data": {"PairedDeviceList": [{"deviceUid": "00e0db48c130", "hardwareType": "VideoCodec", "hardwareModel": "RealPresence Group 500"}], "mrUid": "0004f2fd088c", "mrStatus": "Hub", "ConnectedDeviceList": [{"hardwareVer": "20", "mrProtocolMinor": 0, "deviceUid": "00e0db48c130", "mrIpAddress": "10.252.149.102", "mrProtocolMajor": 1, "mrPort": 18888, "connectionUpTime": 44475, "softwareRelease": "Release - 6.2.2.6-650033", "softwareDate": "2021-03-04 15:49:39-0600", "hardwareModel": "RealPresence Group 500", "ComponentList": [{"componentName": "TV UI", "componentUri": "tvui", "componentProtocolVer": "1.0", "componentType": "displayUI", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "Group Series Content in", "componentUri": "mrCI0", "componentProtocolVer": "1.0", "componentType": "ContentInput", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "Group Series Display", "componentUri": "mrDisplay1", "componentProtocolVer": "1.0", "componentType": "displaySink", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "GS LEDs", "componentUri": "mrGSLedC", "componentProtocolVer": "1.0", "componentType": "led", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "gsPTP", "componentUri": "mrPtp", "componentProtocolVer": "1.0", "componentType": "ptpControl", "componentSerialNumber": "", "componentDetail": "", "componentVersion": ""}, {"componentName": "GS system component", "componentUri": "system", "componentProtocolVer": "1.0", "componentType": "system", "componentSerialNumber": "8G180248C130CV", "componentDetail": "", "componentVersion": ""}, {"componentName": "Group Series Audio", "componentUri": "mrAudio", "componentProtocolVer": "1.0", "componentType": "audioSrcSink", "componentSerialNumber": "", "componentDetail": "Local-HDMI", "componentVersion": ""}, {"componentName": "Group Series EagleEye Camera", "componentUri": "mrCam0", "componentProtocolVer": "1.0", "componentType": "cameraSrc", "componentSerialNumber": "", "componentDetail": "", "componentVersion": "HDCI-MPTZ_EEP"}]}]}, "Status": "2000"}
Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.
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