Hello,
I am currently attempting to add a vSAN adapter instance to vROps using the REST APIs provided, however I can't seem to get the input format correct.
This is current input I have been trying, via postman:
{
"name": "",
"adapterKindKey": "VirtualAndPhysicalSANAdapter",
"resourceKindKey": "VirtualAndPhysicalSANAdapter Instance",
"description": "",
"collectorId": "",
"collectorGroupId": "",
"monitoringInterval": 5,
"resourceIdentifiers": [
{
"name": "AutoDiscovery",
"value": "true"
},
{
"name": "EnableCimApi",
"value": "false"
},
{
"name": "VCServer",
"value": ""
}
],
"credential" : {
"id" : null,
"name" : "VC-Credential-2",
"adapterKindKey" : "VirtualAndPhysicalSANAdapter",
"credentialKindKey" : "PRINCIPALCREDENTIAL",
"fields" : [
{
"name" : "USER",
"value" : ""
},
{
"name" : "PASSWORD",
"value" : ""
}
]
}
}
With this input, I receive the following response:
{
"message": "Request Validation Failed. Reason is \"null\".",
"httpStatusCode": 400,
"apiErrorCode": 1517
}
I then change the "id" on line 24. to "null", I get:
{
"message": "Invalid input format.",
"moreInformation": [
{
"name": "api-uri",
"value": "/suite-api/api/adapters"
}
],
"httpStatusCode": 400,
"apiErrorCode": 400
}
I have played about with a few different input formats, but no dice.
Previously we have been able to get the correct format to add a vSphere adapter instance.
If more information is required, please ask.
Thanks in advance.
Hello, please see atatched sample for exact keywords (take from adpater describe.xml):
{ "name": "VSAN AI name",
"adapterKindKey": "VirtualAndPhysicalSANAdapter",
"description": "",
"collectorId": "",
"collectorGroupId": "",
"monitoringInterval": 5,
"resourceIdentifiers": [
{
"name": "AutoDiscovery",
"value": "true"
},
{
"name": "EnableCimApi",
"value": "false"
},
{
"name": "VCServer",
"value": "10.10.10.10"
}
],
"credential" : {
"id" : null,
"name" : "VC-Credential-forVSAN",
"adapterKindKey" : "VirtualAndPhysicalSANAdapter",
"credentialKindKey" : "VCCredential",
"fields" : [
{
"name" : "VCUSER",
"value" : ""
},
{
"name" : "VCPASSWORD",
"value" : ""
}
]
}
}
I am referencing the createAdapterInstance API in https://vrops-server/suite-api/docs/rest/index.html
Making a POST to /suite-api/api/adapters.https://vckip-hvrpsm01.lmig.com/suite-api/docs/rest/index.html
Hello, please see atatched sample for exact keywords (take from adpater describe.xml):
{ "name": "VSAN AI name",
"adapterKindKey": "VirtualAndPhysicalSANAdapter",
"description": "",
"collectorId": "",
"collectorGroupId": "",
"monitoringInterval": 5,
"resourceIdentifiers": [
{
"name": "AutoDiscovery",
"value": "true"
},
{
"name": "EnableCimApi",
"value": "false"
},
{
"name": "VCServer",
"value": "10.10.10.10"
}
],
"credential" : {
"id" : null,
"name" : "VC-Credential-forVSAN",
"adapterKindKey" : "VirtualAndPhysicalSANAdapter",
"credentialKindKey" : "VCCredential",
"fields" : [
{
"name" : "VCUSER",
"value" : ""
},
{
"name" : "VCPASSWORD",
"value" : ""
}
]
}
}
Thanks for your help Robert.
For future reference, where were you able to find the adapter describe.xml?
Corresponding describe.xml can be found under Adapters installation folder (/usr/lib/vmware-vcops/user/plugins/inbound), but you also can get the same information by "GET /api/credentialkinds" REST API: