Get the device's associated credential name via API
Hi,
In the Rest API documentation it's mentioned to use GetCredentialsForDevice endpoint to get associated credentials of a device, but in the response, I get all the credentials from different types exist in OPManager, and it's not possible to recognize the credential related to the device actually. here is a response example of http://localhost:8060/api/json/device/GetCredentialsForDevice :
- {
- "snmp": [
- {
- "credentialName": "Public",
- "type": "SNMP v1/v2",
- "checked": ""
- },
- {
- "credentialName": "MyCredential",
- "type": "SNMP v1/v2",
- "checked": ""
- },
- {
- "credentialName": "SNMP V3 Cred",
- "type": "SNMP v3",
- "checked": ""
- }
- ],
- "todisplayCitrix": "FALSE",
- "toDisplay": "all",
- "todisplayVMWare": "FALSE",
- "todisplayUCS": "FALSE",
- "cliCredentials": [
- {
- "credentialName": "Centos linux SSH",
- "type": "Linux",
- "checked": ""
- }
- ],
- "wmiCredentials": [
- {
- "credentialName": "testCred",
- "type": "Windows",
- "checked": ""
- }
- ]
- }
The same is for getAssociatedCredentials, Which lists all available credentials of snmp or WMI types and makes it impossible to detect the actual associated credentials with the device, ( http://localhost:8060/api/json/device/getAssociatedCredentials )
- {
- "VMwareCredentialName": "None",
- "nonSnmpCredType": "single",
- "hrType": "WMI",
- "parentCategory": "DomainController",
- "SnmpCredentialName": "MyCredential",
- "snmpCredentialList": [
- "None",
- "SNMP V3 Cred",
- "MyCredential",
- "Public"
- ],
- "CitrixCredentialName": "None",
- "type": "Windows 2008 R2",
- "windowsCredentialList": [
- "testCred",
- "WMI - mail server"
- ]
- }
How could you recognize that the WMI credential of this device is "WMI - mail server" and not "testCred"?
Thanks
New to ADSelfService Plus?