After you identify the object types required for the adapter, you provide parameter values for the object types to create an adapter instance. Your POST request includes a request body with the required parameters.

About this task

To create an adapter instance, the VCURL setting is mandatory.

Prerequisites

Verify that you have an IP address and credentials for a vCenter.

Procedure

  1. Make a POST request to create the adapter instance.
    POST https://vrealize.example.com/suite-api/api/adapters
  2. Examine the response to find the name for the vSphere Solution and its adapter types.

    See the response portion of Adapter Instance.

Adapter Instance

This example creates the adapter instance for a vCenter with the following parameters:

  • Display Name: VC Adapter Instance

  • Description: A vCenter Adapter Instance for VC 12.345.678.9

  • vCenter Server IP address: https://12.345.678.9

  • Credential name: VC-Credential-1

  • User Name: administrator@vsphere.local

  • Password: VC-dummy-passwd

AUTODISCOVERY and PROCESSCHANGEEVENTS are optional, but are included to show additional examples of resource identifiers in the request body and in the response.

Request header:

POST https://vrealize.example.com/suite-api/api/adapters

Request body in JSON format:

{
  "name" : "VC Adapter Instance",
  "description" : "A vCenter Adapter Instance for VC 12.345.678.9",
  "collectorId" : "1",
  "adapterKindKey" : "VMWARE",
  "resourceIdentifiers" : [ 
    {
      "name" : "AUTODISCOVERY",
      "value" : "true"
    }, 
    {
      "name" : "PROCESSCHANGEEVENTS",
      "value" : "true"
    }, 
    {
      "name" : "VCURL",
      "value" : "https://12.345.678.9"
    } 
  ],
  "credential" : {
    "id" : null,
    "name" : "VC-Credential-1",
    "adapterKindKey" : "VMWARE",
    "credentialKindKey" : "PRINCIPALCREDENTIAL",
    "fields" : [ 
      {
        "name" : "USER",
        "value" : "administrator@vsphere.local"
      }, 
      {
        "name" : "PASSWORD",
        "value" : "VC-dummy-passwd"
      } 
    ],
  },
}

Snippet of the response in JSON:

201 Created

{
  "resourceKey": {
    "name": "VC Adapter Instance",
    "adapterKindKey": "VMWARE",
    "resourceKindKey": "VMwareAdapter Instance",
    "resourceIdentifiers": [
      {
        "identifierType": {
          "name": "AUTODISCOVERY",
          "dataType": "STRING",
          "isPartOfUniqueness": false
        },
        "value": "true"
      },
      {
        "identifierType": {
          "name": "DISABLE_COMPUTATION_BASED_ON_CONSUMERS",
          "dataType": "STRING",
          "isPartOfUniqueness": false
        },
        "value": ""
      },
      {
        "identifierType": {
          "name": "DV_PORT_GROUP_DISABLED",
          "dataType": "STRING",
          "isPartOfUniqueness": false
        },
        "value": ""
      },
      {
        "identifierType": {
        "name": "DVS_DISABLED",
        "dataType": "STRING",
        "isPartOfUniqueness": false
        },
        "value": ""
      },
      {
        "identifierType": {
          "name": "PROCESSCHANGEEVENTS",
          "dataType": "STRING",
          "isPartOfUniqueness": false
        },
        "value": "true"
      },
      {
        "identifierType": {
          "name": "VCURL",
          "dataType": "STRING",
          "isPartOfUniqueness": true
        },
        "value": "https://12.345.678.9"
      },
      {
        "identifierType": {
          "name": "VM_FOLDER_DISABLED",
          "dataType": "STRING",
          "isPartOfUniqueness": false
        },
        "value": ""
      },
      {
        "identifierType": {
          "name": "VM_LIMIT",
          "dataType": "STRING",
          "isPartOfUniqueness": false
        },
        "value": ""
      }
    ]
  },
  "description": "A vCenter Adapter Instance for VC 12.345.678.9",
  "collectorId": 1,
  "collectorGroupId": "909c2fbf-2c2c-4957-9a75-21bf2a887d31",
  "credentialInstanceId": "65081a8d-d462-43b2-b4e0-596eaf3d497e",
  "monitoringInterval": 5,
  "adapter-certificates": [
    {
      "thumbprint": "2520fb4351bc91ee7b82ef7cc54a8d88fa893da9",
      "certificateDetails": "[ 
        Version: V3 Subject: C=US, CN=12.345.678.9 
        Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11 
        Key: Sun RSA public key, 2048 bits modulus: ... 
        Validity: [From: Wed Jul 15 19:26:51 UTC 2015, To: Tue Jul 08 11:26:30 UTC 2025] 
        Issuer: O=W12R2UINanduVC, C=US, DC=local, DC=vsphere, CN=CA ...
          ...
      ]"
    }
  ],
  ...
  "id": "a97bd204-e3e5-404b-a219-e2b20cf158d2"
}

The API creates a new adapter with an internally generated UUID that uniquely identifies the object. The API response includes the certificates that vCenter 12.345.678.9 presents. The value of the adapter instance ID is used to start monitoring and collecting data.