vsphere-automation-vapi

The Ruby gem for the vSphere VAPI API

  • API version: 2.0.0
  • Package version: 0.2.2

Installation

Add this line to your application's Gemfile:

gem 'vsphere-automation-vapi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vsphere-automation-vapi

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'vsphere-automation-vapi'

# Setup authorization
VSphereAutomation.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end

api_instance = VSphereAutomation::VAPI::MetadataAuthenticationComponentApi.new
component_id = 'component_id_example' # String | Identifier of the component element.
action = 'action_example' # String | ~action=fingerprint

begin
  #Retrieves the fingerprint computed from the authentication metadata of the component element corresponding to {@param.name componentId}. <p> The fingerprint provides clients an efficient way to check if the metadata for a particular component has been modified on the server. The client can do this by comparing the result of this operation with the fingerprint returned in the result of {@link vapi.metadata.authentication.Component#get}.
  result = api_instance.fingerprint(component_id, action)
  p result
rescue VSphereAutomation::ApiError => e
  puts "Exception when calling MetadataAuthenticationComponentApi->fingerprint: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://<vcenter>/rest

Class Method HTTP request Description
VSphereAutomation::VAPI::MetadataAuthenticationComponentApi fingerprint POST /com/vmware/vapi/metadata/authentication/component/id:component_id Retrieves the fingerprint computed from the authentication metadata of the component element corresponding to componentId.

The fingerprint provides clients an efficient way to check if the metadata for a particular component has been modified on the server. The client can do this by comparing the result of this operation with the fingerprint returned in the result of vapi.metadata.authentication.Component#get.

VSphereAutomation::VAPI::MetadataAuthenticationComponentApi get GET /com/vmware/vapi/metadata/authentication/component/id:component_id Retrieves authentication information about the component element corresponding to componentId.

The ComponentData contains the authentication information about the component element and it's fingerprint. It contains information about all the package elements that belong to this component element.

VSphereAutomation::VAPI::MetadataAuthenticationComponentApi list GET /com/vmware/vapi/metadata/authentication/component Returns the identifiers for the component elements that have authentication information.
VSphereAutomation::VAPI::MetadataAuthenticationPackageApi get GET /com/vmware/vapi/metadata/authentication/package/id:package_id Retrieves authentication information about the package element corresponding to packageId.
VSphereAutomation::VAPI::MetadataAuthenticationPackageApi list GET /com/vmware/vapi/metadata/authentication/package Returns the identifiers for the package elements that have authentication information.
VSphereAutomation::VAPI::MetadataAuthenticationServiceApi get GET /com/vmware/vapi/metadata/authentication/service/id:service_id Retrieves authentication information about the service element corresponding to serviceId.
VSphereAutomation::VAPI::MetadataAuthenticationServiceApi list GET /com/vmware/vapi/metadata/authentication/service Returns the identifiers for the service elements that have authentication information.
VSphereAutomation::VAPI::MetadataAuthenticationServiceOperationApi get POST /com/vmware/vapi/metadata/authentication/service/operation/id:service_id Retrieves the authentication information about an operation element corresponding to operationId contained in the service element corresponding to serviceId.
VSphereAutomation::VAPI::MetadataAuthenticationServiceOperationApi list GET /com/vmware/vapi/metadata/authentication/service/operation Returns the identifiers for the operation elements contained in the service element corresponding to serviceId that have authentication information.
VSphereAutomation::VAPI::MetadataCliCommandApi fingerprint POST /com/vmware/vapi/metadata/cli/command?~action=fingerprint Returns the aggregate fingerprint of all the command metadata from all the metadata sources.

The fingerprint provides clients an efficient way to check if the metadata for commands has been modified on the server.

VSphereAutomation::VAPI::MetadataCliCommandApi get POST /com/vmware/vapi/metadata/cli/command Retrieves information about a command including information about how to execute that command.
VSphereAutomation::VAPI::MetadataCliCommandApi list GET /com/vmware/vapi/metadata/cli/command Returns the identifiers of all commands, or commands in a specific namespace.
VSphereAutomation::VAPI::MetadataCliNamespaceApi fingerprint POST /com/vmware/vapi/metadata/cli/namespace Returns the aggregate fingerprint of all the namespace metadata from all the metadata sources.

The fingerprint provides clients an efficient way to check if the metadata for namespaces has been modified on the server.

VSphereAutomation::VAPI::MetadataCliNamespaceApi get POST /com/vmware/vapi/metadata/cli/namespace?~action=get Retreives information about a namespace including information about children of that namespace.
VSphereAutomation::VAPI::MetadataCliNamespaceApi list GET /com/vmware/vapi/metadata/cli/namespace Returns the identifiers of all namespaces registered with the infrastructure.
VSphereAutomation::VAPI::MetadataMetamodelComponentApi fingerprint POST /com/vmware/vapi/metadata/metamodel/component/id:component_id Retrieves the fingerprint computed from the metamodel metadata of the component element corresponding to componentId.

The fingerprint provides clients an efficient way to check if the metadata for a particular component element has been modified on the server. The client can do this by comparing the result of this operation with the fingerprint returned in the result of vapi.metadata.metamodel.Component#get.

VSphereAutomation::VAPI::MetadataMetamodelComponentApi get GET /com/vmware/vapi/metadata/metamodel/component/id:component_id Retrieves metamodel information about the component element corresponding to componentId.

The ComponentData contains the metamodel information about the component and it's fingerprint. It contains information about all the package elements that are contained in this component element.

VSphereAutomation::VAPI::MetadataMetamodelComponentApi list GET /com/vmware/vapi/metadata/metamodel/component Returns the identifiers for the component elements that are registered with the infrastructure.
VSphereAutomation::VAPI::MetadataMetamodelEnumerationApi get GET /com/vmware/vapi/metadata/metamodel/enumeration/id:enumeration_id Retrieves information about the enumeration element corresponding to enumerationId.

The EnumerationInfo contains the metamodel information about the enumeration value element contained in the enumeration element.

VSphereAutomation::VAPI::MetadataMetamodelEnumerationApi list GET /com/vmware/vapi/metadata/metamodel/enumeration Returns the identifiers for the enumeration elements that are contained in all the package elements, service elements and structure elements.
VSphereAutomation::VAPI::MetadataMetamodelPackageApi get GET /com/vmware/vapi/metadata/metamodel/package/id:package_id Retrieves information about the package element corresponding to packageId.
VSphereAutomation::VAPI::MetadataMetamodelPackageApi list GET /com/vmware/vapi/metadata/metamodel/package Returns the identifiers for the packages elements that are contained in all the registered component elements.
VSphereAutomation::VAPI::MetadataMetamodelResourceApi list GET /com/vmware/vapi/metadata/metamodel/resource Returns the set of resource types present across all the service elements contained in all the package elements.
VSphereAutomation::VAPI::MetadataMetamodelResourceModelApi list GET /com/vmware/vapi/metadata/metamodel/resource/model Returns the set of identifiers for the structure elements that are models for the resource type corresponding to resourceId.

The vapi.metadata.metamodel.Structure service provides operations to retrieve more details about the structure elements corresponding to the identifiers returned by this operation.

VSphereAutomation::VAPI::MetadataMetamodelServiceApi get GET /com/vmware/vapi/metadata/metamodel/service/id:service_id Retrieves information about the service element corresponding to serviceId.

The ServiceInfo contains the metamodel information for the operation elements, structure elements and enumeration elements contained in the service element.

VSphereAutomation::VAPI::MetadataMetamodelServiceApi list GET /com/vmware/vapi/metadata/metamodel/service Returns the identifiers for the service elements that are currently registered with the infrastructure.

The list of service elements is an aggregate list of all the service elements contained in all the package elements.

VSphereAutomation::VAPI::MetadataMetamodelServiceOperationApi get GET /com/vmware/vapi/metadata/metamodel/service/operation/id:service_id/id:operation_id Retrieves the metamodel information about an operation element corresponding to operationId contained in the service element corresponding to serviceId.
VSphereAutomation::VAPI::MetadataMetamodelServiceOperationApi list GET /com/vmware/vapi/metadata/metamodel/service/operation Returns the identifiers for the operation elements that are defined in the scope of serviceId.
VSphereAutomation::VAPI::MetadataMetamodelStructureApi get GET /com/vmware/vapi/metadata/metamodel/structure/id:structure_id Retrieves information about the structure element corresponding to structureId.

The StructureInfo contains the metamodel information about the structure element. It contains information about all the field elements and enumeration elements contained in this structure element.

VSphereAutomation::VAPI::MetadataMetamodelStructureApi list GET /com/vmware/vapi/metadata/metamodel/structure Returns the identifiers for the structure elements that are contained in all the package elements and service elements.
VSphereAutomation::VAPI::MetadataPrivilegeComponentApi fingerprint POST /com/vmware/vapi/metadata/privilege/component/id:component_id Retrieves the fingerprint computed from the privilege metadata of the component element corresponding to componentId.

The fingerprint provides clients an efficient way to check if the metadata for a particular component has been modified on the server. The client can do this by comparing the result of this operation with the fingerprint returned in the result of vapi.metadata.privilege.Component#get.

VSphereAutomation::VAPI::MetadataPrivilegeComponentApi get GET /com/vmware/vapi/metadata/privilege/component/id:component_id Retrieves privilege information about the component element corresponding to componentId.

The ComponentData contains the privilege information about the component element and its fingerprint. It contains information about all the package elements that belong to this component element.

VSphereAutomation::VAPI::MetadataPrivilegeComponentApi list GET /com/vmware/vapi/metadata/privilege/component Returns the identifiers for the component elements that have privilege information.
VSphereAutomation::VAPI::MetadataPrivilegePackageApi get GET /com/vmware/vapi/metadata/privilege/package/id:package_id Retrieves privilege information about the package element corresponding to packageId.
VSphereAutomation::VAPI::MetadataPrivilegePackageApi list GET /com/vmware/vapi/metadata/privilege/package Returns the identifiers for the package elements that have privilege information.
VSphereAutomation::VAPI::MetadataPrivilegeServiceApi get GET /com/vmware/vapi/metadata/privilege/service/id:service_id Retrieves privilege information about the service element corresponding to serviceId.
VSphereAutomation::VAPI::MetadataPrivilegeServiceApi list GET /com/vmware/vapi/metadata/privilege/service Returns the identifiers for the service elements that have privilege information.
VSphereAutomation::VAPI::MetadataPrivilegeServiceOperationApi get POST /com/vmware/vapi/metadata/privilege/service/operation/id:service_id Retrieves the privilege information about an operation element corresponding to operationId contained in the service element corresponding to serviceId.
VSphereAutomation::VAPI::MetadataPrivilegeServiceOperationApi list GET /com/vmware/vapi/metadata/privilege/service/operation Returns the identifiers for the operation elements contained in the service element corresponding to serviceId that have privilege information.
VSphereAutomation::VAPI::RestNavigationComponentApi list GET /com/vmware/vapi/rest/navigation/component Gets list of all vAPI REST Components.
VSphereAutomation::VAPI::RestNavigationOptionsApi get POST /com/vmware/vapi/rest/navigation/options Retrieves operations for specific URL.
VSphereAutomation::VAPI::RestNavigationResourceApi get GET /com/vmware/vapi/rest/navigation/resource/id:type_id/id:instance_id Gets List of all Operations about a vAPI REST Resource. Information is searched for by typeId and instanceId is used only in URLs.
VSphereAutomation::VAPI::RestNavigationResourceApi list GET /com/vmware/vapi/rest/navigation/resource Gets list of all vAPI REST Resources.
VSphereAutomation::VAPI::RestNavigationRootApi get GET /com/vmware/vapi/rest/navigation/root Retrieves information about a vAPI REST Root.
VSphereAutomation::VAPI::RestNavigationServiceApi list GET /com/vmware/vapi/rest/navigation/service Gets list of all vAPI REST Services for a vAPI REST Component.
VSphereAutomation::VAPI::VcenterActivationApi cancel POST /com/vmware/vapi/vcenter/activation/id:activation_id Sends a request to cancel the task associated with the provided activationId.

Documentation for Models