Operations
appliance
The appliance
API provides services for managing vCenter Appliance configuration. The API is available starting in vSphere 6.7.
appliance access
The appliance.access
API provides services for managing access to the appliance. The API is available starting in vSphere 6.5.
consolecli
consolecli
service provides operations Get/Set enabled state of CLI.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/access/consolecli |
Get enabled state of the console-based controlled CLI (TTY1). |
set |
PUT https://{server}/rest/appliance/access/consolecli |
Set enabled state of the console-based controlled CLI (TTY1). |
dcui
dcui
service provides operations Get/Set enabled state of DCUI.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/access/dcui |
Get enabled state of Direct Console User Interface (DCUI TTY2). |
set |
PUT https://{server}/rest/appliance/access/dcui |
Set enabled state of Direct Console User Interface (DCUI TTY2). |
shell
shell
service provides operations Get/Set enabled state of BASH.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/access/shell |
Get enabled state of BASH, that is, access to BASH from within the controlled CLI. |
set |
PUT https://{server}/rest/appliance/access/shell |
Set enabled state of BASH, that is, access to BASH from within the controlled CLI. |
ssh
ssh
service provides operations Get/Set enabled state of SSH-based controlled CLI.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/access/ssh |
Get enabled state of the SSH-based controlled CLI. |
set |
PUT https://{server}/rest/appliance/access/ssh |
Set enabled state of the SSH-based controlled CLI. |
appliance health
The appliance.health
API provides services for reporting the health of the various subsystems of the the appliance. The API is available starting in vSphere 6.5.
health
The health
service provides operations to retrieve the appliance health information. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
messages |
GET https://{server}/rest/appliance/health/{item}/messages |
Get health messages. This operation was added in vSphere API 6.7 |
applmgmt
applmgmt
service provides operations Get health status of applmgmt services.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/applmgmt |
Get health status of applmgmt services. |
databasestorage
databasestorage
service provides operations Get database storage health.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/database-storage |
Get database storage health. |
load
load
service provides operations Get load health.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/load |
Get load health. |
mem
mem
service provides operations Get memory health.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/mem |
Get memory health. |
softwarepackages
softwarepackages
service provides operations Get information on available software updates available in remote VUM repository.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/software-packages |
Get information on available software updates available in the remote vSphere Update Manager repository. Red indicates that security updates are available. Orange indicates that non-security updates are available. Green indicates that there are no updates available. Gray indicates that there was an error retreiving information on software updates. |
storage
storage
service provides operations Get storage health.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/storage |
Get storage health. |
swap
swap
service provides operations Get swap health.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/swap |
Get swap health. |
system
system
service provides operations Get overall health of the system.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/health/system |
Get overall health of system. |
lastcheck |
GET https://{server}/rest/appliance/health/system/lastcheck |
Get last check timestamp of the health of the system. |
appliance local accounts
local accounts
The local_accounts
service provides operations to manage local user account. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/appliance/local-accounts/{username} |
Create a new local user account. This operation was added in vSphere API 6.7 |
delete |
DELETE https://{server}/rest/appliance/local-accounts/{username} |
Delete a local user account. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/appliance/local-accounts/{username} |
Get the local user account information. This operation was added in vSphere API 6.7 |
list |
GET https://{server}/rest/appliance/local-accounts |
Get a list of the local user accounts. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/local-accounts/{username} |
Set local user account properties. This operation was added in vSphere API 6.7 |
update |
PATCH https://{server}/rest/appliance/local-accounts/{username} |
Update selected fields in local user account properties. This operation was added in vSphere API 6.7 |
policy
The policy
service provides operations to manage local user accounts. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/local-accounts/global-policy |
Get the global password policy. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/local-accounts/global-policy |
Set the global password policy. This operation was added in vSphere API 6.7 |
appliance logging
The appliance.logging
API provides services for managing log forwarding in the appliance. The API is available starting in vSphere 6.5.
forwarding
The forwarding
service provides operations to manage forwarding of log messages to remote logging servers. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/logging/forwarding |
Returns the configuration for forwarding log messages to remote logging servers. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/logging/forwarding |
Sets the configuration for forwarding log messages to remote log servers. This operation was added in vSphere API 6.7 |
test |
POST https://{server}/rest/appliance/logging/forwarding?action=test |
Validates the current log forwarding configuration by checking the liveness of the remote machine and optionally sending a test diagnostic log message from the appliance to all configured logging servers to allow manual end-to-end validation. The message that is sent is: "This is a diagnostic log test message from vCenter Server.". This operation was added in vSphere API 6.7 |
monitoring
monitoring
service provides operations Get and list monitoring data for requested item.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/monitoring/{stat_id} |
Get monitored item info |
list |
GET https://{server}/rest/appliance/monitoring |
Get monitored items list |
query |
GET https://{server}/rest/appliance/monitoring/query |
Get monitoring data. |
appliance networking
The appliance.networking
API provides services for managing network configuration of the appliance. The API is available starting in vSphere 6.5.
networking
The networking
service provides operations Get Network configurations. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/networking |
Get Networking information for all configured interfaces. This operation was added in vSphere API 6.7 |
reset |
POST https://{server}/rest/appliance/networking?action=reset |
Reset and restarts network configuration on all interfaces, also this will renew the DHCP lease for DHCP IP address. This operation was added in vSphere API 6.7 |
update |
PATCH https://{server}/rest/appliance/networking |
Enable or Disable ipv6 on all interfaces. This operation was added in vSphere API 6.7 |
appliance networking dns
domains
domains
service provides operations DNS search domains.
Operation |
HTTP request |
Description |
add |
POST https://{server}/rest/appliance/networking/dns/domains |
Add domain to DNS search domains. |
list |
GET https://{server}/rest/appliance/networking/dns/domains |
Get list of DNS search domains. |
set |
PUT https://{server}/rest/appliance/networking/dns/domains |
Set DNS search domains. |
hostname
hostname
service provides operations Performs operations on Fully Qualified Doman Name.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/networking/dns/hostname |
Get the Fully Qualified Doman Name. |
set |
PUT https://{server}/rest/appliance/networking/dns/hostname |
Set the Fully Qualified Domain Name. |
test |
POST https://{server}/rest/appliance/networking/dns/hostname/test |
Test the Fully Qualified Domain Name. |
servers
servers
service provides operations DNS server configuration.
Operation |
HTTP request |
Description |
add |
POST https://{server}/rest/appliance/networking/dns/servers |
Add a DNS server. This method fails if mode argument is "dhcp" |
get |
GET https://{server}/rest/appliance/networking/dns/servers |
Get DNS server configuration. |
set |
PUT https://{server}/rest/appliance/networking/dns/servers |
Set the DNS server configuration. If you set the mode argument to "DHCP", a DHCP refresh is forced. |
test |
POST https://{server}/rest/appliance/networking/dns/servers/test |
Test if dns servers are reachable. |
appliance networking interfaces
interfaces
interfaces
service provides operations Provides information about network interface.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/networking/interfaces/{interface_name} |
Get information about a particular network interface. |
list |
GET https://{server}/rest/appliance/networking/interfaces |
Get list of available network interfaces, including those that are not yet configured. |
ipv4
The ipv4
service provides operations to perform IPv4 network configuration for interfaces. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/networking/interfaces/{interface_name}/ipv4 |
Get IPv4 network configuration for specific NIC. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/networking/interfaces/{interface_name}/ipv4 |
Set IPv4 network configuration for specific network interface. This operation was added in vSphere API 6.7 |
ipv6
The ipv6
service provides operations to perform IPv6 network configuration for interfaces. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/networking/interfaces/{interface_name}/ipv6 |
Get IPv6 network configuration for specific interface. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/networking/interfaces/{interface_name}/ipv6 |
Set IPv6 network configuration for specific interface. This operation was added in vSphere API 6.7 |
no proxy
The no_proxy
service provides operations to configure a connection that does not need a proxy. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/networking/noproxy |
Returns servers for which no proxy configuration will be applied. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/networking/noproxy |
Sets servers for which no proxy configuration should be applied. This operation sets environment variables. In order for this operation to take effect, a logout from appliance or a service restart is required. If IPv4 is enabled, "127.0.0.1" and "localhost" will always bypass the proxy (even if they are not explicitly configured). This operation was added in vSphere API 6.7 |
proxy
The proxy
service provides operations Proxy configuration. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
delete |
DELETE https://{server}/rest/appliance/networking/proxy/{protocol} |
Deletes a proxy configuration for a specific protocol. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/appliance/networking/proxy/{protocol} |
Gets the proxy configuration for a specific protocol. This operation was added in vSphere API 6.7 |
list |
GET https://{server}/rest/appliance/networking/proxy |
Gets proxy configuration for all configured protocols. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/networking/proxy/{protocol} |
Configures which proxy server to use for the specified protocol. This operation sets environment variables for using proxy. In order for this configuration to take effect a logout / service restart is required. This operation was added in vSphere API 6.7 |
test |
POST https://{server}/rest/appliance/networking/proxy/{protocol}?action=test |
Tests a proxy configuration by testing the connection to the proxy server and test host. This operation was added in vSphere API 6.7 |
ntp
ntp
service provides operations Gets NTP configuration status and tests connection to ntp servers. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/ntp |
Get the NTP configuration status. If you run the 'timesync.get' command, you can retrieve the current time synchronization method (NTP- or VMware Tools-based). The 'ntp' command always returns the NTP server information, even when the time synchronization mode is not set to NTP. If the time synchronization mode is not NTP-based, the NTP server status is displayed as down. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/ntp |
Set NTP servers. This method updates old NTP servers from configuration and sets the input NTP servers in the configuration. If NTP based time synchronization is used internally, the NTP daemon will be restarted to reload given NTP configuration. In case NTP based time synchronization is not used, this method only replaces servers in the NTP configuration. This operation was added in vSphere API 6.7 |
test |
POST https://{server}/rest/appliance/ntp/test |
Test the connection to a list of ntp servers. This operation was added in vSphere API 6.7 |
appliance recovery
The appliance.recovery
API provides services for backin up and restoring vCenter Appliance configuration. The API is available starting in vSphere 6.7.
recovery
The recovery
service provides operations to invoke an appliance recovery (backup and restore). This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/recovery |
Gets the properties of the appliance Recovery subsystem. This operation was added in vSphere API 6.7 |
appliance recovery backup
backup
backup
service provides operations Performs backup restore operations
Operation |
HTTP request |
Description |
validate |
POST https://{server}/rest/appliance/recovery/backup/validate |
Check for backup errors without starting backup. |
appliance recovery backup job
job
The job
service provides operations to be performed on a backup job.
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/appliance/recovery/backup/job/{id}/cancel |
Cancel the backup job. |
create |
POST https://{server}/rest/appliance/recovery/backup/job |
Initiate backup. |
get |
GET https://{server}/rest/appliance/recovery/backup/job/{id} |
See backup job progress/result. |
list |
GET https://{server}/rest/appliance/recovery/backup/job |
Get list of backup jobs |
details
The details
service provides operations to get the details about backup jobs. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/appliance/recovery/backup/job/details |
Returns detailed information about the current and historical backup jobs. This operation was added in vSphere API 6.7 |
parts
parts
service provides operations Provides list of parts optional for the backup
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/recovery/backup/parts/{id} |
Gets the size (in MB) of the part. |
list |
GET https://{server}/rest/appliance/recovery/backup/parts |
Gets a list of the backup parts. |
schedules
The schedules
service provides operations to be performed to manage backup schedules. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/appliance/recovery/backup/schedules/{schedule} |
Creates a schedule. This operation was added in vSphere API 6.7 |
delete |
DELETE https://{server}/rest/appliance/recovery/backup/schedules/{schedule} |
Deletes an existing schedule. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/appliance/recovery/backup/schedules/{schedule} |
Returns an existing schedule information based on id. This operation was added in vSphere API 6.7 |
list |
GET https://{server}/rest/appliance/recovery/backup/schedules |
Returns a list of existing schedules with details. This operation was added in vSphere API 6.7 |
run |
POST https://{server}/rest/appliance/recovery/backup/schedules/{schedule}?action=run |
Initiate backup with the specified schedule. This operation was added in vSphere API 6.7 |
update |
PUT https://{server}/rest/appliance/recovery/backup/schedules/update/{schedule} |
Updates a schedule. This operation was added in vSphere API 6.7 |
appliance recovery backup system name
system name
The system_name
service provides operations to enumerate system names of appliance backups. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/appliance/recovery/backup/system-name |
Returns a list of system names for which backup archives exist under loc_spec . This operation was added in vSphere API 6.7 |
archive
The archive
service provides operations to get the backup information. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/recovery/backup/system-name/{system_name}/archives/{archive} |
Returns the information for backup corresponding to given backup location and system name. This operation was added in vSphere API 6.7 |
list |
GET https://{server}/rest/appliance/recovery/backup/system-name/{system_name}/archives |
Returns information about backup archives corresponding to given backup location and system name, which match the appliance.recovery.backup.system_name.archive.filter_spec. This operation was added in vSphere API 6.7 |
appliance recovery reconciliation
job
The job
service provides operations to create and get the status of reconciliation job. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/appliance/recovery/reconciliation/job |
Initiate reconciliation. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/appliance/recovery/reconciliation/job |
Get reconciliation job progress/result. This operation was added in vSphere API 6.7 |
appliance recovery restore
restore
restore
service provides operations Performs restore operations
Operation |
HTTP request |
Description |
validate |
POST https://{server}/rest/appliance/recovery/restore/validate |
Get metadata before restore |
job
job
service provides operations Performs restore operations
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/appliance/recovery/restore/job/cancel |
Cancel the restore job |
create |
POST https://{server}/rest/appliance/recovery/restore/job |
Initiate restore. |
get |
GET https://{server}/rest/appliance/recovery/restore/job |
See restore job progress/result. |
services
The Service
service provides operations to manage a single/set of appliance services. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/services/{service} |
Returns the state of a service. This operation was added in vSphere API 6.7 |
list |
GET https://{server}/rest/appliance/services |
Lists details of vCenter services. This operation was added in vSphere API 6.7 |
restart |
POST https://{server}/rest/appliance/services/{service}/restart |
Restarts a service. This operation was added in vSphere API 6.7 |
start |
POST https://{server}/rest/appliance/services/{service}/start |
Starts a service. This operation was added in vSphere API 6.7 |
stop |
POST https://{server}/rest/appliance/services/{service}/stop |
Stops a service. This operation was added in vSphere API 6.7 |
shutdown
shutdown
service provides operations Performs reboot/shutdown operations on appliance. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/appliance/shutdown/cancel |
Cancel pending shutdown action. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/appliance/shutdown |
Get details about the pending shutdown action. This operation was added in vSphere API 6.7 |
poweroff |
POST https://{server}/rest/appliance/shutdown/poweroff |
Power off the appliance. This operation was added in vSphere API 6.7 |
reboot |
POST https://{server}/rest/appliance/shutdown/reboot |
Reboot the appliance. This operation was added in vSphere API 6.7 |
appliance system
The appliance.system
API provides services to query the appliance system information. The API is available starting in vSphere 6.5.
storage
storage
service provides operations Appliance storage configuration
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/appliance/system/storage |
Get disk to partition mapping. |
resize |
POST https://{server}/rest/appliance/system/storage/resize |
Resize all partitions to 100 percent of disk size. |
resize_ex |
POST https://{server}/rest/appliance/system/storage?action=resize-ex |
Resize all partitions to 100 percent of disk size. This operation was added in vSphere API 6.7 |
appliance system time
time
time
service provides operations Gets system time.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/system/time |
Get system time. |
timezone
The timezone
service provides operations to get and set the appliance timezone. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/system/time/timezone |
Get time zone. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/system/time/timezone |
Set time zone. This operation was added in vSphere API 6.7 |
uptime
uptime
service provides operations Get the system uptime.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/system/uptime |
Get the system uptime. |
version
version
service provides operations Get the appliance version.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/system/version |
Get the version. |
timesync
timesync
service provides operations Performs time synchronization configuration. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/timesync |
Get time synchronization mode. This operation was added in vSphere API 6.7 |
set |
PUT https://{server}/rest/appliance/timesync |
Set time synchronization mode. This operation was added in vSphere API 6.7 |
appliance update
The appliance.update
API provides services for updating the software in the appliance. The API is available starting in vSphere 6.5.
update
The update
service provides operations to get the status of the appliance update. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/appliance/update?action=cancel |
Request the cancellation the update operation that is currently in progress. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/appliance/update |
Gets the current status of the appliance update. This operation was added in vSphere API 6.7 |
pending
The pending
service provides operations to manipulate pending updates.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/update/pending/{version} |
Gets update information |
install |
POST https://{server}/rest/appliance/update/pending/{version}?action=install |
Starts operation of installing the appliance update. Will fail is the update is not staged |
list |
GET https://{server}/rest/appliance/update/pending |
Checks if new updates are available. |
precheck |
POST https://{server}/rest/appliance/update/pending/{version}?action=precheck |
Runs update precheck |
stage |
POST https://{server}/rest/appliance/update/pending/{version}?action=stage |
Starts staging the appliance update. The updates are searched for in the following order: staged, CDROM, URL |
stage_and_install |
POST https://{server}/rest/appliance/update/pending/{version}?action=stage-and-install |
Starts operation of installing the appliance update. Will stage update if not already staged The updates are searched for in the following order: staged, CDROM, URL |
validate |
POST https://{server}/rest/appliance/update/pending/{version}?action=validate |
Validates the user provided data before the update installation. |
policy
The policy
service provides operations to set/get background check for the new updates.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/update/policy |
Gets the automatic update checking and staging policy. |
set |
PUT https://{server}/rest/appliance/update/policy |
Sets the automatic update checking and staging policy. |
staged
The staged
service provides operations to get the status of the staged update.
Operation |
HTTP request |
Description |
delete |
DELETE https://{server}/rest/appliance/update/staged |
Deletes the staged update |
get |
GET https://{server}/rest/appliance/update/staged |
Gets the current status of the staged update |
appliance vmon
The appliance.vmon
API provides services to manage a set of services that are part of the vCenter Server.
service
The service
service provides operations to manage a single/set of services that are managed by vMon.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/appliance/vmon/service/{service} |
Returns the state of a service. |
list_details |
GET https://{server}/rest/appliance/vmon/service |
Lists details of services managed by vMon. |
restart |
POST https://{server}/rest/appliance/vmon/service/{service}/restart |
Restarts a service |
start |
POST https://{server}/rest/appliance/vmon/service/{service}/start |
Starts a service |
stop |
POST https://{server}/rest/appliance/vmon/service/{service}/stop |
Stops a service |
update |
PATCH https://{server}/rest/appliance/vmon/service/{service} |
Updates the properties of a service. |
cis
The cis
API provides VMware common infrastructure services.
session
The session
service allows API clients to manage session tokens including creating, deleting and obtaining information about sessions.
- The create operation creates session token in exchange for another authentication token.
- The delete operation invalidates a session token.
- The get retrieves information about a session token.
The call to the create operation is part of the overall authentication process for API clients. For example, the sequence of steps for establishing a session with SAML token is:
- Connect to lookup service.
- Discover the secure token service (STS) endpoint URL.
- Connect to the secure token service to obtain a SAML token.
- Authenticate to the lookup service using the obtained SAML token.
- Discover the API endpoint URL from lookup service.
- Call the create operation. The create call must include the SAML token.
See the programming guide and samples for additional information about establishing API sessions.
Execution Context and Security Context
To use session based authentication a client should supply the session token obtained through the create operation. The client should add the session token in the security context when using SDK classes. Clients using the REST API should supply the session token as a HTTP header.
Session Lifetime
A session begins with call to the create operation to exchange a SAML token for a API session token. A session ends under the following circumstances:
- Call to the delete operation.
- The session expires. Session expiration may be caused by one of the following situations:
- Client inactivity - For a particular session identified by client requests that specify the associated session ID, the lapsed time since the last request exceeds the maximum interval between requests.
- Unconditional or absolute session expiration time: At the beginning of the session, the session logic uses the SAML token and the system configuration to calculate absolute expiration time.
When a session ends, the authentication logic will reject any subsequent client requests that specify that session. Any operations in progress will continue to completion.
Error Handling
The cis.session returns the following errors:
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/com/vmware/cis/session |
Creates a session with the API. This is the equivalent of login. This operation exchanges user credentials supplied in the security context for a session identifier that is to be used for authenticating subsequent calls. To authenticate subsequent calls clients are expected to include the session key. |
delete |
DELETE https://{server}/rest/com/vmware/cis/session |
Terminates the validity of a session token. This is the equivalent of log out. A session identifier is expected as part of the request. |
get |
POST https://{server}/rest/com/vmware/cis/session?~action=get |
Returns information about the current session. This operation expects a valid session identifier to be supplied. A side effect of invoking this operation may be a change to the session's last accessed time to the current time if this is supported by the session implementation. Invoking any other operation in the API will also update the session's last accessed time. This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities. |
cis tagging
The cis.tagging
component provides operations and structures to attach metadata, by means of tags, to vSphere objects to make these objects more sortable and searchable. You can use it to create, manage, and enumerate tags and their categories (the group a tag belongs to). You can also query the attached tags and attached objects.
category
The category
service provides operations to create, read, update, delete, and enumerate categories.
Operation |
HTTP request |
Description |
add_to_used_by |
POST https://{server}/rest/com/vmware/cis/tagging/category/id:{category_id}?~action=add-to-used-by |
Adds the used_by_entity to the cis.tagging.category_model.used_by subscribers set for the specified category. If the used_by_entity is already in the set, then this becomes an idempotent no-op. To invoke this operation, you need the modify cis.tagging.category_model.used_by privilege on the category. |
create |
POST https://{server}/rest/com/vmware/cis/tagging/category |
Creates a category. To invoke this operation, you need the create category privilege. |
delete |
DELETE https://{server}/rest/com/vmware/cis/tagging/category/id:{category_id} |
Deletes an existing category. To invoke this operation, you need the delete privilege on the category. |
get |
GET https://{server}/rest/com/vmware/cis/tagging/category/id:{category_id} |
Fetches the category information for the given category identifier. In order to view the category information, you need the read privilege on the category. |
list |
GET https://{server}/rest/com/vmware/cis/tagging/category |
Enumerates the categories in the system. To invoke this operation, you need the read privilege on the individual categories. The array will only contain those categories for which you have read privileges. |
list_used_categories |
POST https://{server}/rest/com/vmware/cis/tagging/category?~action=list-used-categories |
Enumerates all categories for which the used_by_entity is part of the cis.tagging.category_model.used_by subscribers set. To invoke this operation, you need the read privilege on the individual categories. |
remove_from_used_by |
POST https://{server}/rest/com/vmware/cis/tagging/category/id:{category_id}?~action=remove-from-used-by |
Removes the used_by_entity from the cis.tagging.category_model.used_by subscribers set. If the used_by_entity is not using this category, then this becomes a no-op. To invoke this operation, you need the modify cis.tagging.category_model.used_by privilege on the category. |
revoke_propagating_permissions |
POST https://{server}/rest/com/vmware/cis/tagging/category/id:{category_id}?~action=revoke-propagating-permissions |
Revokes all propagating permissions on the given category. You should then attach a direct permission with tagging privileges on the given category. To invoke this operation, you need category related privileges (direct or propagating) on the concerned category. |
update |
PATCH https://{server}/rest/com/vmware/cis/tagging/category/id:{category_id} |
Updates an existing category. To invoke this operation, you need the edit privilege on the category. |
tag
The tag
service provides operations to create, read, update, delete, and enumerate tags.
Operation |
HTTP request |
Description |
add_to_used_by |
POST https://{server}/rest/com/vmware/cis/tagging/tag/id:{tag_id}?~action=add-to-used-by |
Adds the used_by_entity to the cis.tagging.tag_model.used_by subscribers set. If the used_by_entity is already in the set, then this becomes a no-op. To invoke this operation, you need the modify cis.tagging.tag_model.used_by privilege on the tag. |
create |
POST https://{server}/rest/com/vmware/cis/tagging/tag |
Creates a tag. To invoke this operation, you need the create tag privilege on the input category. |
delete |
DELETE https://{server}/rest/com/vmware/cis/tagging/tag/id:{tag_id} |
Deletes an existing tag. To invoke this operation, you need the delete privilege on the tag. |
get |
GET https://{server}/rest/com/vmware/cis/tagging/tag/id:{tag_id} |
Fetches the tag information for the given tag identifier. To invoke this operation, you need the read privilege on the tag in order to view the tag info. |
list |
GET https://{server}/rest/com/vmware/cis/tagging/tag |
Enumerates the tags in the system. To invoke this operation, you need read privilege on the individual tags. The array will only contain tags for which you have read privileges. |
list_tags_for_category |
POST https://{server}/rest/com/vmware/cis/tagging/tag/id:{category_id}?~action=list-tags-for-category |
Enumerates all tags for the given category. To invoke this operation, you need the read privilege on the given category and the individual tags in that category. |
list_used_tags |
POST https://{server}/rest/com/vmware/cis/tagging/tag?~action=list-used-tags |
Enumerates all tags for which the used_by_entity is part of the cis.tagging.tag_model.used_by subscribers set. To invoke this operation, you need the read privilege on the individual tags. |
remove_from_used_by |
POST https://{server}/rest/com/vmware/cis/tagging/tag/id:{tag_id}?~action=remove-from-used-by |
Removes the used_by_entity from the cis.tagging.tag_model.used_by subscribers set. If the used_by_entity is not using this tag, then this becomes a no-op. To invoke this operation, you need modify cis.tagging.tag_model.used_by privilege on the tag. |
revoke_propagating_permissions |
POST https://{server}/rest/com/vmware/cis/tagging/tag/id:{tag_id}?~action=revoke-propagating-permissions |
Revokes all propagating permissions on the given tag. You should then attach a direct permission with tagging privileges on the given tag. To invoke this operation, you need tag related privileges (direct or propagating) on the concerned tag. |
update |
PATCH https://{server}/rest/com/vmware/cis/tagging/tag/id:{tag_id} |
Updates an existing tag. To invoke this operation, you need the edit privilege on the tag. |
tag association
The tag_association
service provides operations to attach, detach, and query tags.
Operation |
HTTP request |
Description |
attach |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=attach |
Attaches the given tag to the input object. The tag needs to meet the cardinality (cis.tagging.category_model.cardinality) and associability (cis.tagging.category_model.associable_types) criteria in order to be eligible for attachment. If the tag is already attached to the object, then this operation is a no-op and an error will not be thrown. To invoke this operation, you need the attach tag privilege on the tag and the read privilege on the object. |
attach_multiple_tags_to_object |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association?~action=attach-multiple-tags-to-object |
Attaches the given tags to the input object. If a tag is already attached to the object, then the individual operation is a no-op and an error will not be added to cis.tagging.tag_association.batch_result.error_messages. To invoke this operation, you need the read privilege on the object and the attach tag privilege on each tag. This operation was added in vSphere API 6.5 |
attach_tag_to_multiple_objects |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=attach-tag-to-multiple-objects |
Attaches the given tag to the input objects. If a tag is already attached to the object, then the individual operation is a no-op and an error will not be added to cis.tagging.tag_association.batch_result.error_messages. To invoke this operation, you need the attach tag privilege on the tag and the read privilege on each object. This operation was added in vSphere API 6.5 |
detach |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=detach |
Detaches the tag from the given object. If the tag is already removed from the object, then this operation is a no-op and an error will not be thrown. To invoke this operation, you need the attach tag privilege on the tag and the read privilege on the object. |
detach_multiple_tags_from_object |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association?~action=detach-multiple-tags-from-object |
Detaches the given tags from the input object. If a tag is already removed from the object, then the individual operation is a no-op and an error will not be added to cis.tagging.tag_association.batch_result.error_messages. To invoke this operation, you need the read privilege on the object and the attach tag privilege each tag. This operation was added in vSphere API 6.5 |
detach_tag_from_multiple_objects |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=detach-tag-from-multiple-objects |
Detaches the given tag from the input objects. If a tag is already removed from the object, then the individual operation is a no-op and an error will not be added to cis.tagging.tag_association.batch_result.error_messages. To invoke this operation, you need the attach tag privilege on the tag and the read privilege on each object. This operation was added in vSphere API 6.5 |
list_attachable_tags |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association?~action=list-attachable-tags |
Fetches the array of attachable tags for the given object, omitting the tags that have already been attached. Criteria for attachability is calculated based on tagging cardinality (cis.tagging.category_model.cardinality) and associability (cis.tagging.category_model.associable_types) constructs. To invoke this operation, you need the read privilege on the input object. The array will only contain those tags for which you have read privileges. |
list_attached_objects |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=list-attached-objects |
Fetches the array of attached objects for the given tag. To invoke this operation, you need the read privilege on the input tag. Only those objects for which you have the read privilege will be returned. |
list_attached_objects_on_tags |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association?~action=list-attached-objects-on-tags |
Fetches the array of cis.tagging.tag_association.tag_to_objects describing the input tag identifiers and the objects they are attached to. To invoke this operation, you need the read privilege on each input tag. The cis.tagging.tag_association.tag_to_objects.object_ids will only contain those objects for which you have the read privilege. This operation was added in vSphere API 6.5 |
list_attached_tags |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association?~action=list-attached-tags |
Fetches the array of tags attached to the given object. To invoke this operation, you need the read privilege on the input object. The array will only contain those tags for which you have the read privileges. |
list_attached_tags_on_objects |
POST https://{server}/rest/com/vmware/cis/tagging/tag-association?~action=list-attached-tags-on-objects |
Fetches the array of cis.tagging.tag_association.object_to_tags describing the input object identifiers and the tags attached to each object. To invoke this operation, you need the read privilege on each input object. The cis.tagging.tag_association.object_to_tags.tag_ids will only contain those tags for which you have the read privilege. This operation was added in vSphere API 6.5 |
content
The Content API provides structures and services for configuring global settings and permissions, and for managing libraries in the Content Library Service.
configuration
The configuration
service provides operations to configure the global settings of the Content Library Service. The configuration settings are used by the Content Library Service to control the behavior of various operations.
Operation |
HTTP request |
Description |
get |
POST https://{server}/rest/com/vmware/content/configuration?~action=get |
Retrieves the current configuration values. |
update |
PATCH https://{server}/rest/com/vmware/content/configuration |
Updates the configuration. The update is incremental. Any field in the content.configuration_model structure that is unset will not be modified. Note that this update operation doesn't guarantee an atomic change of all the properties. In the case of a system crash or failure, some of the properties could be left unchanged while others may be updated. |
content library
The Content Library API provides structures and services for defining and managing the library's items, subscription, publication, and storage.
library
The library
service provides operations to manage and find content.library_model entities. The library
service provides support for generic functionality which can be applied equally to all types of libraries. The functionality provided by this service will not affect the properties specific to the type of library. See also content.local_library and content.subscribed_library.
Operation |
HTTP request |
Description |
find |
POST https://{server}/rest/com/vmware/content/library?~action=find |
Returns a list of all the visible (as determined by authorization policy) libraries matching the requested content.library.find_spec. |
get |
GET https://{server}/rest/com/vmware/content/library/id:{library_id} |
Returns a given content.library_model. |
list |
GET https://{server}/rest/com/vmware/content/library |
Returns the identifiers of all libraries of any type in the Content Library. |
update |
PATCH https://{server}/rest/com/vmware/content/library/id:{library_id} |
Updates the properties of a library. This is an incremental update to the library. Any field in the content.library_model structure that is unset will not be modified. This operation will only update the common properties for all library types. This will not, for example, update the content.library_model.publish_info of a local library, nor the content.library_model.subscription_info of a subscribed library. Specific properties are updated in update and update. |
content library item
The Content Library Item API provides structures and services for managing files in a library item.
item
The item
service provides operations for managing library items.
Operation |
HTTP request |
Description |
copy |
POST https://{server}/rest/com/vmware/content/library/item/id:{source_library_item_id}?~action=copy |
Copies a library item. Copying a library item allows a duplicate to be made within the same or different library. The copy occurs by first creating a new library item, whose identifier is returned. The content of the library item is then copied asynchronously. This copy can be tracked as a task. If the copy fails, Content Library Service will roll back the copy by deleting any content that was already copied, and removing the new library item. A failure during rollback may require manual cleanup by an administrator. A library item cannot be copied into a subscribed library. |
create |
POST https://{server}/rest/com/vmware/content/library/item |
Creates a new library item. A new library item is created without any content. After creation, content can be added through the content.library.item.update_session and content.library.item.updatesession.file services. A library item cannot be created in a subscribed library. |
delete |
DELETE https://{server}/rest/com/vmware/content/library/item/id:{library_item_id} |
Deletes a library item. This operation will immediately remove the item from the library that owns it. The content of the item will be asynchronously removed from the storage backings. The content deletion can be tracked with a task. In the event that the task fails, an administrator may need to manually remove the files from the storage backing. This operation cannot be used to delete a library item that is a member of a subscribed library. Removing an item from a subscribed library requires deleting the item from the original published local library and syncing the subscribed library. |
find |
POST https://{server}/rest/com/vmware/content/library/item?~action=find |
Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested content.library.item.find_spec. |
get |
GET https://{server}/rest/com/vmware/content/library/item/id:{library_item_id} |
Returns the content.library.item_model with the given identifier. |
list |
GET https://{server}/rest/com/vmware/content/library/item |
Returns the identifiers of all items in the given library. |
update |
PATCH https://{server}/rest/com/vmware/content/library/item/id:{library_item_id} |
Updates the specified properties of a library item. This is an incremental update to the library item. Fields that are unset in the update specification are left unchanged. This operation cannot update a library item that is a member of a subscribed library. Those items must be updated in the source published library and synchronized to the subscribed library. |
download session
The download_session
service manipulates download sessions, which are used to download content from the Content Library Service. A download session is an object that tracks the download of content (that is, downloading content from the Content Library Service) and acts as a lease to keep the download links available.
The content.library.item.downloadsession.file service provides access to the download links.
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/com/vmware/content/library/item/download-session/id:{download_session_id}?~action=cancel |
Cancels the download session. This operation will abort any ongoing transfers and invalidate transfer urls that the client may be downloading from. |
create |
POST https://{server}/rest/com/vmware/content/library/item/download-session |
Creates a new download session. |
delete |
DELETE https://{server}/rest/com/vmware/content/library/item/download-session/id:{download_session_id} |
Deletes a download session. This removes the session and all information associated with it. Removing a download session leaves any current transfers for that session in an indeterminate state (there is no guarantee that the transfers will be able to complete). However there will no longer be a means of inspecting the status of those downloads except by seeing the effect on the library item. Download sessions for which there is no download activity or which are complete will automatically be expired and then deleted after a period of time. |
fail |
POST https://{server}/rest/com/vmware/content/library/item/download-session/id:{download_session_id}?~action=fail |
Terminates the download session with a client specified error message. This is useful in transmitting client side failures (for example, not being able to download a file) to the server side. |
get |
GET https://{server}/rest/com/vmware/content/library/item/download-session/id:{download_session_id} |
Gets the download session with the specified identifier, including the most up-to-date status information for the session. |
keep_alive |
POST https://{server}/rest/com/vmware/content/library/item/download-session/id:{download_session_id}?~action=keep-alive |
Keeps a download session alive. This operation is allowed only if the session is in the ACTIVE state. If there is no activity for a download session for a certain period of time, the download session will expire. The download session expiration timeout is configurable in the Content Library Service system configuration. The default is five minutes. Invoking this operation enables a client to specifically extend the lifetime of an active download session. |
list |
GET https://{server}/rest/com/vmware/content/library/item/download-session |
Lists the identifiers of the download sessions created by the calling user. Optionally may filter by library item. |
content library item downloadsession
The Content Library Item Download Session API provides structures and services for downloading files in a session.
file
The file
service provides operations for accessing files within a download session. After a download session is created against a library item, the file
service can be used to retrieve all downloadable content within the library item. Since the content may not be available immediately in a downloadable form on the server side, the client will have to prepare the file and wait for the file status to become PREPARED.
See content.library.item.download_session.
Operation |
HTTP request |
Description |
get |
POST https://{server}/rest/com/vmware/content/library/item/downloadsession/file/id:{download_session_id}?~action=get |
Retrieves file download information for a specific file. |
list |
GET https://{server}/rest/com/vmware/content/library/item/downloadsession/file |
Lists the information of all the files in the library item associated with the download session. |
prepare |
POST https://{server}/rest/com/vmware/content/library/item/downloadsession/file/id:{download_session_id}?~action=prepare |
Requests a file to be prepared for download. |
file
The file
service can be used to query for information on the files within a library item. Files are objects which are added to a library item through the content.library.item.update_session and content.library.item.updatesession.file services.
Operation |
HTTP request |
Description |
get |
POST https://{server}/rest/com/vmware/content/library/item/file/id:{library_item_id}?~action=get |
Retrieves the information for a single file in a library item by its name. |
list |
GET https://{server}/rest/com/vmware/content/library/item/file |
Lists all of the files that are stored within a given library item. |
storage
storage
is a resource that represents a specific instance of a file stored on a storage backing. Unlike content.library.item.file, which is abstract, storage represents concrete files on the various storage backings. A file is only represented once in content.library.item.file, but will be represented multiple times (once for each storage backing) in storage
. The storage
service provides information on the storage backing and the specific location of the file in that backing to privileged users who want direct access to the file on the storage medium.
Operation |
HTTP request |
Description |
get |
POST https://{server}/rest/com/vmware/content/library/item/storage/id:{library_item_id}?~action=get |
Retrieves the storage information for a specific file in a library item. |
list |
GET https://{server}/rest/com/vmware/content/library/item/storage |
Lists all storage items for a given library item. |
update session
The update_session
service manipulates sessions that are used to upload content into the Content Library Service, and/or to remove files from a library item. An update session is a resource which tracks changes to content. An update session is created with a set of files that are intended to be uploaded to a specific content.library.item_model, or removed from an item. The session object can be used to track the uploads and inspect the changes that are being made to the item by that upload. It can also serve as a channel to check on the result of the upload, and status messages such as errors and warnings for the upload.
Modifications are not visible to other clients unless the session is completed and all necessary files have been received.
The management of the files within the session is done through the content.library.item.updatesession.file service.
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/com/vmware/content/library/item/update-session/id:{update_session_id}?~action=cancel |
Cancels the update session and sets its state to CANCELED. This operation will free up any temporary resources currently associated with the session. This operation is not allowed if the session has been already completed. Cancelling an update session will cancel any in progress transfers (either uploaded by the client or pulled by the server). Any content that has been already received will be scheduled for deletion. |
complete |
POST https://{server}/rest/com/vmware/content/library/item/update-session/id:{update_session_id}?~action=complete |
Completes the update session. This indicates that the client has finished making all the changes required to the underlying library item. If the client is pushing the content to the server, the library item will be updated once this call returns. If the server is pulling the content, the call may return before the changes become visible. In that case, the client can track the session to know when the server is done. This operation requires the session to be in the ACTIVE state. Depending on the type of the library item associated with this session, a type adapter may be invoked to verify the validity of the files uploaded. The user can explicitly validate the session before completing the session by using the validate operation. Modifications are not visible to other clients unless the session is completed and all necessary files have been received. |
create |
POST https://{server}/rest/com/vmware/content/library/item/update-session |
Creates a new update session. An update session is used to make modifications to a library item. Modifications are not visible to other clients unless the session is completed and all necessary files have been received. Content Library Service allows only one single update session to be active for a specific library item. |
delete |
DELETE https://{server}/rest/com/vmware/content/library/item/update-session/id:{update_session_id} |
Deletes an update session. This removes the session and all information associated with it. Removing an update session leaves any current transfers for that session in an indeterminate state (there is no guarantee that the server will terminate the transfers, or that the transfers can be completed). However there will no longer be a means of inspecting the status of those uploads except by seeing the effect on the library item. Update sessions for which there is no upload activity or which are complete will automatically be deleted after a period of time. |
fail |
POST https://{server}/rest/com/vmware/content/library/item/update-session/id:{update_session_id}?~action=fail |
Terminates the update session with a client specified error message. This is useful in transmitting client side failures (for example, not being able to access a file) to the server side. |
get |
GET https://{server}/rest/com/vmware/content/library/item/update-session/id:{update_session_id} |
Gets the update session with the specified identifier, including the most up-to-date status information for the session. |
keep_alive |
POST https://{server}/rest/com/vmware/content/library/item/update-session/id:{update_session_id}?~action=keep-alive |
Keeps an update session alive. If there is no activity for an update session after a period of time, the update session will expire, then be deleted. The update session expiration timeout is configurable in the Content Library Service system configuration. The default is five minutes. Invoking this operation enables a client to specifically extend the lifetime of the update session. |
list |
GET https://{server}/rest/com/vmware/content/library/item/update-session |
Lists the identifiers of the update session created by the calling user. Optionally may filter by library item. |
content library item updatesession
The Content Library Item Update Session API provides structures and services for updating files in a session.
file
The file
service provides operations for accessing files within an update session. After an update session is created against a library item, the file
service can be used to make changes to the underlying library item metadata as well as the content of the files. The following changes can be made:
- deleting an existing file within the library item. This deletes both the metadata and the content.
- updating an existing file with new content.
- adding a new file to the library item.
The above changes are not applied or visible until the session is completed. See content.library.item.update_session.
Operation |
HTTP request |
Description |
add |
POST https://{server}/rest/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=add |
Requests file content to be changed (either created, or updated). Depending on the source type of the file, this operation will either return an upload endpoint where the client can push the content, or the server will pull from the provided source endpoint. If a file with the same name already exists in this session, this operation will be used to update the content of the existing file. When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move. |
get |
POST https://{server}/rest/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=get |
Retrieves information about a specific file in the snapshot of the library item at the time when the update session was created. |
list |
GET https://{server}/rest/com/vmware/content/library/item/updatesession/file |
Lists all files in the library item associated with the update session. |
remove |
POST https://{server}/rest/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=remove |
Requests a file to be removed. The file will only be effectively removed when the update session is completed. |
validate |
POST https://{server}/rest/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=validate |
Validates the files in the update session with the referenced identifier and ensures all necessary files are received. In the case where a file is missing, this operation will return its name in the content.library.item.updatesession.file.validation_result.missing_files set. The user can add the missing files and try re-validating. For other type of errors, content.library.item.updatesession.file.validation_result.invalid_files will contain the list of invalid files. |
subscribed item
The subscribed_item
service manages the unique features of library items that are members of a subscribed library.
Operation |
HTTP request |
Description |
evict |
POST https://{server}/rest/com/vmware/content/library/subscribed-item/id:{library_item_id}?~action=evict |
Evicts the cached content of a library item in a subscribed library. This operation allows the cached content of a library item to be removed to free up storage capacity. This operation will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set content.library.item_model.cached to false. |
sync |
POST https://{server}/rest/com/vmware/content/library/subscribed-item/id:{library_item_id}?~action=sync |
Forces the synchronization of an individual library item in a subscribed library. Synchronizing an individual item will update that item's metadata from the remote source. If the source library item on the remote library has been deleted, this operation will delete the library item from the subscribed library as well. The default behavior of the synchronization is determined by the content.library.subscription_info of the library which owns the library item. - If content.library.subscription_info.on_demand is true, then the file content is not synchronized by default. In this case, only the library item metadata is synchronized. The file content may still be forcefully synchronized by passing true for the
force_sync_content parameter. - If content.library.subscription_info.on_demand is false, then this call will always synchronize the file content. The
force_sync_content parameter is ignored when the subscription is not on-demand. When the file content has been synchronized, the content.library.item_model.cached field will be true. This operation will return immediately and create an asynchronous task to perform the synchronization. |
local library
The local_library
service manages local libraries. The local_library
service provides support for creating and maintaining local library instances. A local library may also use the content.library service to manage general library functionality.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/com/vmware/content/local-library |
Creates a new local library. |
delete |
DELETE https://{server}/rest/com/vmware/content/local-library/id:{library_id} |
Deletes the specified local library. Deleting a local library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal. |
get |
GET https://{server}/rest/com/vmware/content/local-library/id:{library_id} |
Returns a given local library. |
list |
GET https://{server}/rest/com/vmware/content/local-library |
Returns the identifiers of all local libraries in the Content Library. |
update |
PATCH https://{server}/rest/com/vmware/content/local-library/id:{library_id} |
Updates the properties of a local library. This is an incremental update to the local library. Fields that are unset in the update specification will be left unchanged. |
subscribed library
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/com/vmware/content/subscribed-library |
Creates a new subscribed library. Once created, the subscribed library will be empty. If the content.library_model.subscription_info property is set, the Content Library Service will attempt to synchronize to the remote source. This is an asynchronous operation so the content of the published library may not immediately appear. |
delete |
DELETE https://{server}/rest/com/vmware/content/subscribed-library/id:{library_id} |
Deletes the specified subscribed library. Deleting a subscribed library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal. |
evict |
POST https://{server}/rest/com/vmware/content/subscribed-library/id:{library_id}?~action=evict |
Evicts the cached content of an on-demand subscribed library. This operation allows the cached content of a subscribed library to be removed to free up storage capacity. This operation will only work when a subscribed library is synchronized on-demand. |
get |
GET https://{server}/rest/com/vmware/content/subscribed-library/id:{library_id} |
Returns a given subscribed library. |
list |
GET https://{server}/rest/com/vmware/content/subscribed-library |
Returns the identifiers of all subscribed libraries in the Content Library. |
probe |
POST https://{server}/rest/com/vmware/content/subscribed-library?~action=probe |
Probes remote library subscription information, including URL, SSL certificate and password. The resulting content.subscribed_library.probe_result structure describes whether or not the subscription configuration is successful. |
sync |
POST https://{server}/rest/com/vmware/content/subscribed-library/id:{library_id}?~action=sync |
Forces the synchronization of the subscribed library. Synchronizing a subscribed library forcefully with this operation will perform the same synchronization behavior as would run periodically for the library. The content.library.subscription_info.on_demand setting is respected. Calling this operation on a library that is already in the process of synchronizing will have no effect. |
update |
PATCH https://{server}/rest/com/vmware/content/subscribed-library/id:{library_id} |
Updates the properties of a subscribed library. This is an incremental update to the subscribed library. Fields that are unset in the update specification will be left unchanged. |
type
The type
service exposes the content.library.item_model types that this Content Library Service supports. A library item has an optional type which can be specified with the content.library.item_model.type field. For items with a type that is supported by a plugin, the Content Library Service may understand the files which are part of the library item and can produce metadata for the item.
In other cases, uploads may require a process in which one upload implies subsequent uploads. For example, an Open Virtualization Format (OVF) package is composed of an OVF descriptor file and the associated virtual disk files. Uploading an OVF descriptor can enable the Content Library Service to understand that the complete OVF package requires additional disk files, and it can set up the transfers for the disks automatically by adding the file entries for the disks when the OVF descriptor is uploaded.
When a type is not supported by a plugin, or the type is not specified, the Content Library Service can handle a library item in a default way, without adding metadata to the item or guiding the upload process.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/com/vmware/content/type |
Returns a array of content.type.info instances which describe the type support plugins in this Content Library. |
The vapi.metadata.authentication
API provides services that expose authentication information for operation elements across all the service elements. To calculate the effective authentication information for an operation element, you should first see if there is an authentication scheme specified for the operation element. If it is not specified, then authentication scheme for the service element that contains this operation element is used. If it is not specified for the service element as well, then the authentication scheme for the package element that contains this service element is used.
The component
service provides operations to retrieve authentication information of a component element. A component element is said to contain authentication information if any one of package elements contained in it has authentication information.
Operation |
HTTP request |
Description |
fingerprint |
POST https://{server}/rest/com/vmware/vapi/metadata/authentication/component/id:{component_id}?~action=fingerprint |
Retrieves the fingerprint computed from the authentication metadata of the component element corresponding to component_id . 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 get. |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/authentication/component/id:{component_id} |
Retrieves authentication information about the component element corresponding to component_id . The vapi.metadata.authentication.component_data 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. |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/authentication/component |
Returns the identifiers for the component elements that have authentication information. |
The package
service provides operations to retrieve authentication information of a package element. A package element is said to contain authentication information if there is a default authentication assigned to all service elements contained in the package element or if one of the service element contained in this package element has authentication information.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/authentication/package/id:{package_id} |
Retrieves authentication information about the package element corresponding to package_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/authentication/package |
Returns the identifiers for the package elements that have authentication information. |
The vapi.metadata.authentication.service
API provides services to retrieve authentication information for operation elements.
The service
service provides operations to retrieve authentication information of a service element. A service element is said to contain authentication information if there is a default authentication assigned to all operation elements contained in a service element or if one of the operation elements contained in this service element has authentication information.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/authentication/service/id:{service_id} |
Retrieves authentication information about the service element corresponding to service_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/authentication/service |
Returns the identifiers for the service elements that have authentication information. |
The operation
service provides operations to retrieve authentication information of an operation element. An operation element is said to contain authentication information if authentication schemes are specified in the authentication definition file.
Operation |
HTTP request |
Description |
get |
POST https://{server}/rest/com/vmware/vapi/metadata/authentication/service/operation/id:{service_id}?~action=get |
Retrieves the authentication information about an operation element corresponding to operation_id contained in the service element corresponding to service_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/authentication/service/operation |
Returns the identifiers for the operation elements contained in the service element corresponding to service_id that have authentication information. |
The vapi.metadata.cli
API provides services that expose all the information required to display namespace or command help, execute a command and display it's result.
The command
service provides operations to get information about command line interface (CLI) commands.
Operation |
HTTP request |
Description |
fingerprint |
POST https://{server}/rest/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. |
get |
POST https://{server}/rest/com/vmware/vapi/metadata/cli/command?~action=get |
Retrieves information about a command including information about how to execute that command. |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/cli/command |
Returns the identifiers of all commands, or commands in a specific namespace. |
The namespace
service provides operations to get information about command line interface (CLI) namespaces.
Operation |
HTTP request |
Description |
fingerprint |
POST https://{server}/rest/com/vmware/vapi/metadata/cli/namespace?~action=fingerprint |
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. |
get |
POST https://{server}/rest/com/vmware/vapi/metadata/cli/namespace?~action=get |
Retreives information about a namespace including information about children of that namespace. |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/cli/namespace |
Returns the identifiers of all namespaces registered with the infrastructure. |
The vapi.metadata.metamodel
API provides services that expose all the information present in the interface definition language (IDL) specification. Metamodel metadata is organized into an hierarchy of elements. The main elements are:
- Enumeration: An enumeration element that has a list of enumeration value elements.
- Constant: A constant element has a name and a value.
- Structure: A structure element can have field elements, constant elements and enumeration elements.
- Operation: An operation has a list of parameter elements, result element and error elements.
- Service: A service is a collection of operation elements, structure elements, enumerated elements and constant elements.
- Package: A package is a collection of service elements, structure elements and enumeration elements.
- Component: A component is a collection of package elements.
The vapi.metadata.metamodel
API has services that enables two styles of client applications: - A client can retrieve the exact pieces of information it requires using the various granularities the API supports (that is vapi.metadata.metamodel.component, vapi.metadata.metamodel.package, vapi.metadata.metamodel.service, vapi.metadata.metamodel.structure, vapi.metadata.metamodel.enumeration and vapi.metadata.metamodel.service.operation). In this case, it doesn't cache any information locally and always invokes operations to get the metamodel information it requires.
- A client can retrieve all the metamodel information in fewer operation invocations using the vapi.metadata.metamodel.component service and cache the output locally. It can then poll on the fingerprint information exposed by the vapi.metadata.metamodel.component service to monitor changes in API definition.
The component
service providers operations to retrieve metamodel information of a component element. A component defines a set of functionality that is deployed together and versioned together. For example, all the services that belong to VMware Content Library are part of a single component. A component element describes a component. A component element contains one or more package elements.
The operations for package elements are provided by service vapi.metadata.metamodel.package.
Operation |
HTTP request |
Description |
fingerprint |
POST https://{server}/rest/com/vmware/vapi/metadata/metamodel/component/id:{component_id}?~action=fingerprint |
Retrieves the fingerprint computed from the metamodel metadata of the component element corresponding to component_id . 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 get. |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/component/id:{component_id} |
Retrieves metamodel information about the component element corresponding to component_id . The vapi.metadata.metamodel.component_data 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. |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/component |
Returns the identifiers for the component elements that are registered with the infrastructure. |
The enumeration
service provides operations to retrieve metamodel information about an enumeration element in the interface definition language. The enumeration
has a list of enumeration value elements.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/enumeration/id:{enumeration_id} |
Retrieves information about the enumeration element corresponding to enumeration_id . The vapi.metadata.metamodel.enumeration_info contains the metamodel information about the enumeration value element contained in the enumeration element. |
list |
GET https://{server}/rest/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. |
The package
service provides operations to retrieve metamodel information about a package element in the interface definition language. A package is a logical grouping of services, structures and enumerations. A package element describes the package. It contains the service elements, structure elements and enumeration elements that are grouped together.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/package/id:{package_id} |
Retrieves information about the package element corresponding to package_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/package |
Returns the identifiers for the packages elements that are contained in all the registered component elements. |
The vapi.metadata.metamodel.resource
API provides services to retrieve metamodel information for resource types.
The vapi.metadata.metamodel.resource service provides operations to retrieve information about resource types. A service is a logical grouping of operations that operate on an entity. Each entity is identifier by a namespace (or resource type) and an unique identifier.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/resource |
Returns the set of resource types present across all the service elements contained in all the package elements. |
The model
service provides operations to retrieve information about models. A structure is used as a model if it is used for persisting data about an entity. Some of the fields in the model structure are also used for creating indexes for querying.
One or more services can operate on the same resource type. One or more services can provide the model structure for an entity of this resource type. Using model
service you can retrieve the list of all the structure elements that are model structures for a given resource type.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/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 resource_id . The vapi.metadata.metamodel.structure service provides operations to retrieve more details about the structure elements corresponding to the identifiers returned by this operation. |
The service
service provides operations to retrieve metamodel information about a service element in the interface definition language. A service is a logical grouping of operations that operate on some entity. A service element describes a service. It contains operation elements that describe the operations grouped in the service. It also contains structure elements and enumeration elements corresponding to the structures and enumerations defined in the service.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/service/id:{service_id} |
Retrieves information about the service element corresponding to service_id . The vapi.metadata.metamodel.service_info contains the metamodel information for the operation elements, structure elements and enumeration elements contained in the service element. |
list |
GET https://{server}/rest/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. |
The operation
service provides operations to retrieve metamodel information of an operation element in the interface definition language.
Operation |
HTTP request |
Description |
get |
POST https://{server}/rest/com/vmware/vapi/metadata/metamodel/service/operation/id:{service_id}?~action=get |
Retrieves the metamodel information about an operation element corresponding to operation_id contained in the service element corresponding to service_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/service/operation |
Returns the identifiers for the operation elements that are defined in the scope of service_id . |
The structure
service providers operations to retrieve metamodel information about a structure element in the interface definition language.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/structure/id:{structure_id} |
Retrieves information about the structure element corresponding to structure_id . The vapi.metadata.metamodel.structure_info contains the metamodel information about the structure element. It contains information about all the field elements and enumeration elements contained in this structure element. |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/metamodel/structure |
Returns the identifiers for the structure elements that are contained in all the package elements and service elements. |
The vapi.metadata.privilege
API provides services that expose privilege information for operation elements across all the service elements. An entity has a unique identifier and a resource type. An entity can either be present in one of the parameter elements or if a parameter is a structure element, it could also be present in one of the field elements.
Privileges can be assigned to either operation elements or entities used in the operation element. A list of privileges can also be applied on a package element. This list of privileges would be used as a default for all the operation elements and the entities that do not have any defined privileges.
The component
service provides operations to retrieve privilege information of a component element. A component element is said to contain privilege information if any one of package elements in it contains privilege information.
Operation |
HTTP request |
Description |
fingerprint |
POST https://{server}/rest/com/vmware/vapi/metadata/privilege/component/id:{component_id}?~action=fingerprint |
Retrieves the fingerprint computed from the privilege metadata of the component element corresponding to component_id . 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 get. |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/privilege/component/id:{component_id} |
Retrieves privilege information about the component element corresponding to component_id . The vapi.metadata.privilege.component_data 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. |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/privilege/component |
Returns the identifiers for the component elements that have privilege information. |
The package
service provides operations to retrieve privilege information of a package element. A package element is said to contain privilege information if there is a default privilege assigned to all service elements contained in the package element or if one of the operation elements contained in one of the service elements in this package element has privilege information.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/privilege/package/id:{package_id} |
Retrieves privilege information about the package element corresponding to package_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/privilege/package |
Returns the identifiers for the package elements that have privilege information. |
The vapi.metadata.privilege.service
API provides services to retrieve privilege information for operation elements.
The service
service provides operations to retrieve privilege information of a service element. A service element is said to contain privilege information if one of the operation elements contained in this service element has privilege information.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/com/vmware/vapi/metadata/privilege/service/id:{service_id} |
Retrieves privilege information about the service element corresponding to service_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/privilege/service |
Returns the identifiers for the service elements that have privilege information. |
The operation
service provides operations to retrieve privilege information of an operation element. An operation element is said to contain privilege information if there are any privileges assigned to the operation element or if one of the parameter elements contained in it has privileges assigned in privilege definition file.
Operation |
HTTP request |
Description |
get |
POST https://{server}/rest/com/vmware/vapi/metadata/privilege/service/operation/id:{service_id}?~action=get |
Retrieves the privilege information about an operation element corresponding to operation_id contained in the service element corresponding to service_id . |
list |
GET https://{server}/rest/com/vmware/vapi/metadata/privilege/service/operation |
Returns the identifiers for the operation elements contained in the service element corresponding to service_id that have privilege information. |
vcenter
The vcenter
API provides services for managing VMware vSphere environments. The API is available starting in vSphere 6.5.
cluster
The cluster
service provides operations to manage clusters in the vCenter Server.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/cluster/{cluster} |
Retrieves information about the cluster corresponding to cluster . |
list |
GET https://{server}/rest/vcenter/cluster |
Returns information about at most 1000 visible (subject to permission checks) clusters in vCenter matching the vcenter.cluster.filter_spec. |
datacenter
The datacenter
service provides operations to manage datacenters in the vCenter Server.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/vcenter/datacenter |
Create a new datacenter in the vCenter inventory |
delete |
DELETE https://{server}/rest/vcenter/datacenter/{datacenter} |
Delete an empty datacenter from the vCenter Server |
get |
GET https://{server}/rest/vcenter/datacenter/{datacenter} |
Retrieves information about the datacenter corresponding to datacenter . |
list |
GET https://{server}/rest/vcenter/datacenter |
Returns information about at most 1000 visible (subject to permission checks) datacenters in vCenter matching the vcenter.datacenter.filter_spec. |
vcenter datastore
datastore
The Datastore service provides operations for manipulating a datastore.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/datastore/{datastore} |
Retrieves information about the datastore indicated by datastore . |
list |
GET https://{server}/rest/vcenter/datastore |
Returns information about at most 1000 visible (subject to permission checks) datastores in vCenter matching the vcenter.datastore.filter_spec. |
default policy
The default_policy
service provides operations related to storage policies associated with datastore object. The get operation provides information about the default storage policy associated with the specific datastore. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/datastore/{datastore}/default-policy |
Returns the identifier of the current default storage policy associated with the specified datastore. This operation was added in vSphere API 6.7 |
vcenter deployment
deployment
The deployment
service provides operations to get the status of the vCenter appliance deployment. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/deployment |
Get the current status of the appliance deployment. This operation was added in vSphere API 6.7 |
rollback |
POST https://{server}/rest/vcenter/deployment?action=rollback |
Rollback a failed appliance so it can be configured once again. This operation was added in vSphere API 6.7 |
import history
The import_history
service provides operations for managing the import of vCenter historical data, e.g. Tasks, Events and Statistics, when is is imported separately from the upgrade or migration process. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/vcenter/deployment/history?action=cancel |
Cancels the task for importing vCenter historical data. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/vcenter/deployment/history |
Get the current status of the vCenter historical data import. This operation was added in vSphere API 6.7 |
pause |
POST https://{server}/rest/vcenter/deployment/history?action=pause |
Pauses the task for importing vCenter historical data. This operation was added in vSphere API 6.7 |
resume |
POST https://{server}/rest/vcenter/deployment/history?action=resume |
Resumes the task for importing vCenter historical data. This operation was added in vSphere API 6.7 |
start |
POST https://{server}/rest/vcenter/deployment/history?action=start |
Creates and starts task for importing vCenter historical data. This operation was added in vSphere API 6.7 |
vcenter deployment install
install
The install
service provides operations to configure the installation of the appliance. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/vcenter/deployment/install?action=cancel |
Cancel the appliance installation that is in progress. This operation was added in vSphere API 6.7 |
check |
POST https://{server}/rest/vcenter/deployment/install?action=check |
Run sanity checks using the InstallSpec parameters passed. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/vcenter/deployment/install |
Get the parameters used to configure the ongoing appliance installation. This operation was added in vSphere API 6.7 |
start |
POST https://{server}/rest/vcenter/deployment/install?action=start |
Start the appliance installation. This operation was added in vSphere API 6.7 |
vcenter deployment install initial config remote psc
thumbprint
The thumbprint
service provides operations to get the thumbprint of the remote PSC. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/deployment/install/initial-config/remote-psc/thumbprint |
Gets the SHA1 thumbprint of the remote PSC. This operation was added in vSphere API 6.7 |
vcenter deployment install psc
replicated
The replicated
service provides operations to check if the configuring vCenter Server can be replicated to the remote PSC. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
check |
POST https://{server}/rest/vcenter/deployment/install/psc/replicated?action=check |
Checks whether the provided remote PSC is reachable and can be replicated. This operation was added in vSphere API 6.7 |
standalone
The standalone
service provides operations to check if the values provided for the standalone PSC satisfies the requirements. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
check |
POST https://{server}/rest/vcenter/deployment/install/psc/standalone?action=check |
Checks that the information to configure a non-replicated PSC satisfies the requirements. This operation was added in vSphere API 6.7 |
remote psc
The remote_psc
service provides operations to check if the deployed vCenter Server can register with the remote PSC. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
check |
POST https://{server}/rest/vcenter/deployment/install/remote-psc?action=check |
Checks whether the remote PSC is reachable and the deployed vCenter Server can be registered with the remote PSC. This operation was added in vSphere API 6.7 |
question
The question
service provides operations to get the question raised during deployment and to answer them. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
answer |
POST https://{server}/rest/vcenter/deployment/question?action=answer |
Supply answer to the raised question. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/vcenter/deployment/question |
Get the question that was raised during the configuration. This operation was added in vSphere API 6.7 |
upgrade
The upgrade
service provides operations to configure the upgrade of this appliance from an existing vCenter appliance. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
cancel |
POST https://{server}/rest/vcenter/deployment/upgrade?action=cancel |
Cancel the appliance upgrade that is in progress. This operation was added in vSphere API 6.7 |
check |
POST https://{server}/rest/vcenter/deployment/upgrade?action=check |
Run sanity checks using the UpgradeSpec parameters passed. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/vcenter/deployment/upgrade |
Get the UpgradeSpec parameters used to configure the ongoing appliance upgrade. This operation was added in vSphere API 6.7 |
start |
POST https://{server}/rest/vcenter/deployment/upgrade?action=start |
Start the appliance installation. This operation was added in vSphere API 6.7 |
folder
The Folder service provides operations for manipulating a vCenter Server folder.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/vcenter/folder |
Returns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the vcenter.folder.filter_spec. |
vcenter guest
The vcenter.guest
API provides services for managing guest customization specifications in the vCenter Server.
customization specs
The customization_specs
service provides operations to manage guest customization specifications in the vCenter Server. Warning: This service is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/vcenter/guest/customization-specs |
Returns information about at most 1000 visible (subject to permission checks) guest customization specifications in vCenter matching the vcenter.guest.customization_specs.filter_spec. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
host
The host
service provides operations to manage hosts in the vCenter Server.
Operation |
HTTP request |
Description |
connect |
POST https://{server}/rest/vcenter/host/{host}/connect |
Connect to the host corresponding to host previously added to the vCenter server. |
create |
POST https://{server}/rest/vcenter/host |
Add a new standalone host in the vCenter inventory. The newly connected host will be in connected state. The vCenter Server will verify the SSL certificate before adding the host to its inventory. In the case where the SSL certificate cannot be verified because the Certificate Authority is not recognized or the certificate is self signed, the vCenter Server will fall back to thumbprint verification mode as defined by vcenter.host.create_spec.thumbprint_verification. |
delete |
DELETE https://{server}/rest/vcenter/host/{host} |
Remove a standalone host from the vCenter Server. |
disconnect |
POST https://{server}/rest/vcenter/host/{host}/disconnect |
Disconnect the host corresponding to host from the vCenter server |
list |
GET https://{server}/rest/vcenter/host |
Returns information about at most 1000 visible (subject to permission checks) hosts in vCenter matching the vcenter.host.filter_spec. |
vcenter hvc
The vcenter.hvc
API provides services to manage hybrid links between a local and remote Platform Service Controller.
vcenter hvc links
links
The links
service provides operations to create, delete, get information, and list hybrid links between the local and foreign Platform Service Controller (PSC). Warning: This service is available as technical preview. It may be changed in a future release.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/hvc/links |
Creates a new hybrid link between the local and foreign PSC. Warning: This operation is available as technical preview. It may be changed in a future release. |
delete |
DELETE https://{server}/rest/hvc/links/{link} |
Deletes an existing hybrid link. Warning: This operation is available as technical preview. It may be changed in a future release. |
list |
GET https://{server}/rest/hvc/links |
Enumerates the list of registered hybrid links. Warning: This operation is available as technical preview. It may be changed in a future release. |
vcenter hvc links sync
sync
The sync
service provides operations to create a sync session, get information on Sync. Warning: This service is available as technical preview. It may be changed in a future release.
Operation |
HTTP request |
Description |
reset |
POST https://{server}/rest/hvc/links/{link}/sync?action=reset |
Resets the sync state between the linked domains by initiating a fresh sync for all providers. If an existing sync is in progress this cancels the sync. Warning: This operation is available as technical preview. It may be changed in a future release. |
providers
The providers
service provides operations to create a sync session, get information on Sync. Warning: This service is available as technical preview. It may be changed in a future release.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/hvc/links/{link}/sync/providers/{provider} |
Gets Sync information for a sync provider. Warning: This operation is available as technical preview. It may be changed in a future release. |
list |
GET https://{server}/rest/hvc/links/{link}/sync/providers |
Enumerates the sync providers. Warning: This operation is available as technical preview. It may be changed in a future release. |
start |
POST https://{server}/rest/hvc/links/{link}/sync/providers/{provider}?action=start |
Initiates synchronization between the local and remote replicas for the sync provider. Warning: This operation is available as technical preview. It may be changed in a future release. |
vcenter hvc management
administrators
The administrators
provides operations to update, delete, and list groups in the local sso group. This is limited to the Hybrid Linked Mode service. Warning: This service is available as technical preview. It may be changed in a future release.
Operation |
HTTP request |
Description |
add |
POST https://{server}/rest/hvc/management/administrators?action=add |
Add the local sso group with the new group. Warning: This operation is available as technical preview. It may be changed in a future release. |
get |
GET https://{server}/rest/hvc/management/administrators |
Enumerates the set of all the groups in the local sso group. Warning: This operation is available as technical preview. It may be changed in a future release. |
remove |
POST https://{server}/rest/hvc/management/administrators?action=remove |
Remove the group from the local sso group. Warning: This operation is available as technical preview. It may be changed in a future release. |
vcenter inventory
The vcenter.inventory
component provides operations and structures for retrieving vCenter datastore and network information for a given array of identifiers.
datastore
The datastore
service provides operations to retrieve information about datastores.
Operation |
HTTP request |
Description |
find |
POST https://{server}/rest/com/vmware/vcenter/inventory/datastore?~action=find |
Returns datastore information for the specified datastores. The key in the result key/value pairs is the datastore identifier and the value in the key/value pairs is the datastore information. |
network
The network
service provides operations to retrieve information about vCenter Server networks.
Operation |
HTTP request |
Description |
find |
POST https://{server}/rest/com/vmware/vcenter/inventory/network?~action=find |
Returns network information for the specified vCenter Server networks. The key in the result key/value pairs is the network identifier and the value in the key/value pairs is the network information. |
vcenter iso
The vcenter.iso
API provides structures and services that will let its client mount or unmount an ISO image on a virtual machine as a CD-ROM.
image
Provides an interface to mount and unmount an ISO image on a virtual machine. This is an API that will let its client mount or unmount an ISO image on a virtual machine as a CD-ROM.
Operation |
HTTP request |
Description |
mount |
POST https://{server}/rest/com/vmware/vcenter/iso/image/id:{library_item}?~action=mount |
Mounts an ISO image from a content library on a virtual machine. |
unmount |
POST https://{server}/rest/com/vmware/vcenter/iso/image/id:{vm}?~action=unmount |
Unmounts a previously mounted CD-ROM using an ISO image as a backing. |
network
The Network service provides operations for manipulating a vCenter Server network.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/vcenter/network |
Returns information about at most 1000 visible (subject to permission checks) networks in vCenter matching the vcenter.network.filter_spec. |
vcenter ovf
The vcenter.ovf
API provides services to capture and deploy Open Virtualization Format (OVF) packages to and from the content library. It provides the ability to deploy OVF packages from the content library with support for advanced network topologies, network services, creating virtual appliances and virtual machines in hosts, resource pools or clusters. It also provides the ability to export virtual appliances and virtual machines from hosts, resource pools or clusters as OVF packages to the content library.
export flag
The export_flag
service provides operations for retrieving information about the export flags supported by the server. Export flags can be specified in a vcenter.ovf.library_item.create_spec to customize an OVF export.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/com/vmware/vcenter/ovf/export-flag |
Returns information about the supported export flags by the server. The supported flags are: - PRESERVE_MAC
- Include MAC addresses for network adapters.
- EXTRA_CONFIG
- Include extra configuration in OVF export.
Future server versions might support additional flags. |
import flag
The import_flag
service provides operations for retrieving information about the import flags supported by the deployment platform. Import flags can be specified in a vcenter.ovf.library_item.resource_pool_deployment_spec to customize an OVF deployment.
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/com/vmware/vcenter/ovf/import-flag |
Returns information about the import flags supported by the deployment platform. The supported flags are: - LAX
- Lax mode parsing of the OVF descriptor.
Future server versions might support additional flags. |
library item
The library_item
service provides operations to deploy virtual machines and virtual appliances from library items containing Open Virtualization Format (OVF) packages in content library, as well as operations to create library items in content library from virtual machines and virtual appliances. To deploy a virtual machine or a virtual appliance from a library item:
- Create a vcenter.ovf.library_item.deployment_target to specify the target deployment type and target deployment designation.
- Create a vcenter.ovf.library_item.resource_pool_deployment_spec to specify the parameters for the target deployment.
- Use the
deploy
operation with the created target and parameter specifications, along with the identifier of the specified source content library item. See deploy.
To create a library item in content library from a virtual machine or virtual appliance:
- Create a vcenter.ovf.library_item.deployable_identity to specify the source virtual machine or virtual appliance to be used as the OVF template source.
- Create a vcenter.ovf.library_item.create_target to specify the target library and library item.
- Create a vcenter.ovf.library_item.create_spec to specify the settings for the OVF package to be created.
- Use the
create
operation with the created target and parameter specifications, along with the specified source entity. See create.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/com/vmware/vcenter/ovf/library-item |
Creates a library item in content library from a virtual machine or virtual appliance. This operation creates a library item in content library whose content is an OVF package derived from a source virtual machine or virtual appliance, using the supplied create specification. The OVF package may be stored as in a newly created library item or in an in an existing library item. For an existing library item whose content is updated by this operation, the original content is overwritten. |
deploy |
POST https://{server}/rest/com/vmware/vcenter/ovf/library-item/id:{ovf_library_item_id}?~action=deploy |
Deploys an OVF package stored in content library to a newly created virtual machine or virtual appliance. This operation deploys an OVF package which is stored in the library item specified by ovf_library_item_id . It uses the deployment specification in deployment_spec to deploy the OVF package to the location specified by target . |
filter |
POST https://{server}/rest/com/vmware/vcenter/ovf/library-item/id:{ovf_library_item_id}?~action=filter |
Queries an OVF package stored in content library to retrieve information to use when deploying the package. See deploy. This operation retrieves information from the descriptor of the OVF package stored in the library item specified by ovf_library_item_id . The information returned by the operation can be used to populate the deployment specification (see vcenter.ovf.library_item.resource_pool_deployment_spec when deploying the OVF package to the deployment target specified by target . |
resource pool
The ResourcePool service provides operations for manipulating a vCenter Server resource pool. This service does not include virtual appliances in the inventory of resource pools even though part of the behavior of a virtual appliance is to act like a resource pool.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/resource-pool/{resource_pool} |
Retrieves information about the resource pool indicated by resource_pool . |
list |
GET https://{server}/rest/vcenter/resource-pool |
Returns information about at most 1000 visible (subject to permission checks) resource pools in vCenter matching the vcenter.resource_pool.filter_spec. |
vcenter services
service
The service
service provides operations to manage a single/set of vCenter Server services. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/services/{service} |
Returns the state of a service. This operation was added in vSphere API 6.7 |
list_details |
GET https://{server}/rest/vcenter/services |
Lists details of vCenter services. This operation was added in vSphere API 6.7 |
restart |
POST https://{server}/rest/vcenter/services/{service}/restart |
Restarts a service. This operation was added in vSphere API 6.7 |
start |
POST https://{server}/rest/vcenter/services/{service}/start |
Starts a service. This operation was added in vSphere API 6.7 |
stop |
POST https://{server}/rest/vcenter/services/{service}/stop |
Stops a service. This operation was added in vSphere API 6.7 |
update |
PATCH https://{server}/rest/vcenter/services/{service} |
Updates the properties of a service. This operation was added in vSphere API 6.7 |
vcenter storage
vcenter storage policies
policies
The policies
service provides operations for managing the storage policies. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
check_compatibility |
POST https://{server}/rest/vcenter/storage/policies/{policy}?action=check-compatibility |
Returns datastore compatibility summary about a specific storage policy. This operation was added in vSphere API 6.7 |
list |
GET https://{server}/rest/vcenter/storage/policies |
Returns information about at most 1024 visible (subject to permission checks) storage solicies availabe in vCenter. These storage policies can be used for provisioning virtual machines or disks. This operation was added in vSphere API 6.7 |
vcenter storage policies compliance
compliance
The Compliance service provides operations related to all the associated entities of given compliance statuses. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/vcenter/storage/policies/entities/compliance |
Returns compliance information about entities matching the filter vcenter.storage.policies.compliance.filter_spec. Entities without storage policy association are not returned. This operation was added in vSphere API 6.7 |
VM
The VM
structure provides operations related to query virtual machines of given compliance statuses. This service was added in vSphere API 6.7
VM
The VM
service provides operations managing the storage policy association for a virtual machine and its virtual disks. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
list |
GET https://{server}/rest/vcenter/storage/policies/{policy}/vm |
Returns information about the virtual machines and/or their virtual disks that are associated with the given storage policy. This operation was added in vSphere API 6.7 |
vcenter system config
deployment type
The deployment_type
service provides operations to get/set the type of the appliance. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/system-config/deployment-type |
Get the type of the vCenter appliance. This operation was added in vSphere API 6.7 |
reconfigure |
POST https://{server}/rest/vcenter/system-config/deployment-type |
Reconfigure the type of the vCenter appliance. This operation was added in vSphere API 6.7 |
psc registration
The psc_registration
service provides operations to get and set the PSC_EXTERNAL appliance a VCSA_EXTERNAL appliance is registered with. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/system-config/psc-registration |
Get information of the PSC that this appliance is registered with. This operation was added in vSphere API 6.7 |
repoint |
POST https://{server}/rest/vcenter/system-config/psc-registration |
Repoint this vCenter Server appliance to a different external PSC. This operation was added in vSphere API 6.7 |
vcenter vm
The vcenter.vm
API provides services for managing virtual machines.
VM
The VM
service provides operations for managing the lifecycle of a virtual machine.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/vcenter/vm |
Creates a virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm} |
Deletes a virtual machine. |
get |
GET https://{server}/rest/vcenter/vm/{vm} |
Returns information about a virtual machine. |
list |
GET https://{server}/rest/vcenter/vm |
Returns information about at most 1000 visible (subject to permission checks) virtual machines in vCenter matching the vcenter.VM.filter_spec. |
vcenter vm guest
The vcenter.vm.guest
API provides services for dealing with the guest operating system. This includes information about the state of local file systems and network interfaces and operations to manipulate the guest file system and processes.
identity
The identity
service provides operations for retrieving guest operating system identification information. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/guest/identity |
Return information about the guest. This operation was added in vSphere API 6.7 |
local filesystem
The local_filesystem
service provides operations for retrieving information about the guest operating system local file systems. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/guest/local-filesystem |
Returns details of the local file systems in the guest operating system. This operation was added in vSphere API 6.7 |
power
The power
service provides operations for managing the guest operating system power state of a virtual machine. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/guest/power |
Returns information about the guest operating system power state. This operation was added in vSphere API 6.7 |
reboot |
POST https://{server}/rest/vcenter/vm/{vm}/guest/power?action=reboot |
Issues a request to the guest operating system asking it to perform a reboot. This request returns immediately and does not wait for the guest operating system to complete the operation. This operation was added in vSphere API 6.7 |
shutdown |
POST https://{server}/rest/vcenter/vm/{vm}/guest/power?action=shutdown |
Issues a request to the guest operating system asking it to perform a clean shutdown of all services. This request returns immediately and does not wait for the guest operating system to complete the operation. This operation was added in vSphere API 6.7 |
standby |
POST https://{server}/rest/vcenter/vm/{vm}/guest/power?action=standby |
Issues a request to the guest operating system asking it to perform a suspend operation. This operation was added in vSphere API 6.7 |
vcenter vm hardware
The vcenter.vm.hardware
API provides services for managing the virtual hardware configuration and state of a virtual machine. This includes operations for reading and manipulating virtual device configuration and for querying the runtime state of the devices.
hardware
The hardware
service provides operations for configuring the virtual hardware of a virtual machine.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware |
Returns the virtual hardware settings of a virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware |
Updates the virtual hardware settings of a virtual machine. |
upgrade |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/action/upgrade |
Upgrades the virtual machine to a newer virtual hardware version. |
vcenter vm hardware adapter
The vcenter.vm.hardware.adapter
API provides services for managing the configuration and state of the virtual adapters belonging to a virtual machine. This includes operations for reading and manipulating the conifguration of USB adapters and host bus adapters. Note that services for adapters with no configurable properties or runtime state, such as IDE and PCI adapters, are omitted.
sata
The sata
service provides operations for configuring the virtual SATA adapters of a virtual machine.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/sata |
Adds a virtual SATA adapter to the virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/sata/{adapter} |
Removes a virtual SATA adapter from the virtual machine. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/sata/{adapter} |
Returns information about a virtual SATA adapter. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/sata |
Returns commonly used information about the virtual SATA adapters belonging to the virtual machine. |
scsi
The scsi
service provides operations for configuring the virtual SCSI adapters of a virtual machine.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/scsi |
Adds a virtual SCSI adapter to the virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/scsi/{adapter} |
Removes a virtual SCSI adapter from the virtual machine. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/scsi/{adapter} |
Returns information about a virtual SCSI adapter. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/scsi |
Returns commonly used information about the virtual SCSI adapters belonging to the virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/scsi/{adapter} |
Updates the configuration of a virtual SCSI adapter. |
vcenter vm hardware boot
The vcenter.vm.hardware.boot
API provides services for managing the virtual devices used to boot a virtual machine.
boot
The boot
service provides operations for configuring the settings used when booting a virtual machine.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/boot |
Returns the boot-related settings of a virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/boot |
Updates the boot-related settings of a virtual machine. |
device
The device
service provides operations for configuring the device order used when booting a virtual machine. The boot order may be specified using a mixture of device classes and device instances, chosen from among the following:
- CDROM: Boot from a virtual CD-ROM drive; the device instance(s) will be chosen by the BIOS subsystem.
- FLOPPY: Boot from a virtual floppy drive; the device instance(s) will be chosen by the BIOS subsystem.
- DISK: Boot from a virtual disk device; the device instance is specified explicitly in vcenter.vm.hardware.boot.device.entry.disks list, and multiple instances may be specified in the list.
- ETHERNET: Boot from a virtual Ethernet adapter; the device instance is specified explicitly as vcenter.vm.hardware.boot.device.entry.nic, and multiple adapters may be specified in the boot order list.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/boot/device |
Returns an ordered list of boot devices for the virtual machine. If the array is empty, the virtual machine uses a default boot sequence. |
set |
PUT https://{server}/rest/vcenter/vm/{vm}/hardware/boot/device |
Sets the virtual devices that will be used to boot the virtual machine. The virtual machine will check the devices in order, attempting to boot from each, until the virtual machine boots successfully. If the array is empty, the virtual machine will use a default boot sequence. There should be no more than one instance of vcenter.vm.hardware.boot.device.entry for a given device type except ETHERNET in the array. |
cdrom
The cdrom
service provides operations for configuring the virtual CD-ROM devices of a virtual machine.
Operation |
HTTP request |
Description |
connect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom/{cdrom}/connect |
Connects a virtual CD-ROM device of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. For a powered-off virtual machine, the update operation may be used to configure the virtual CD-ROM device to start in the connected state when the virtual machine is powered on. |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom |
Adds a virtual CD-ROM device to the virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom/{cdrom} |
Removes a virtual CD-ROM device from the virtual machine. |
disconnect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom/{cdrom}/disconnect |
Disconnects a virtual CD-ROM device of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the CD-ROM device is not connected to its backing resource. For a powered-off virtual machine, the update operation may be used to configure the virtual CD-ROM device to start in the disconnected state when the virtual machine is powered on. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom/{cdrom} |
Returns information about a virtual CD-ROM device. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom |
Returns commonly used information about the virtual CD-ROM devices belonging to the virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/cdrom/{cdrom} |
Updates the configuration of a virtual CD-ROM device. |
cpu
The cpu
service provides operations for configuring the CPU settings of a virtual machine.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/cpu |
Returns the CPU-related settings of a virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/cpu |
Updates the CPU-related settings of a virtual machine. |
disk
The disk
service provides operations for configuring the virtual disks of a virtual machine. A virtual disk has a backing such as a VMDK file. The backing has an independent lifecycle from the virtual machine when it is detached from the virtual machine. The create operation provides the ability to create a new virtual disk. When creating a virtual disk, a new VMDK file may be created or an existing VMDK file may used as a backing. Once a VMDK file is associated with a virtual machine, its lifecycle will be bound to the virtual machine. In other words, it will be deleted when the virtual machine is deleted. The delete operation provides the ability to detach a VMDK file from the virtual machine. The delete operation does not delete the VMDK file that backs the virtual disk. Once detached, the VMDK file will not be destroyed when the virtual machine to which it was associated is deleted.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/disk |
Adds a virtual disk to the virtual machine. While adding the virtual disk, a new VMDK file may be created or an existing VMDK file may be used to back the virtual disk. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/disk/{disk} |
Removes a virtual disk from the virtual machine. This operation does not destroy the VMDK file that backs the virtual disk. It only detaches the VMDK file from the virtual machine. Once detached, the VMDK file will not be destroyed when the virtual machine to which it was associated is deleted. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/disk/{disk} |
Returns information about a virtual disk. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/disk |
Returns commonly used information about the virtual disks belonging to the virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/disk/{disk} |
Updates the configuration of a virtual disk. An update operation can be used to detach the existing VMDK file and attach another VMDK file to the virtual machine. |
ethernet
The ethernet
service provides operations for configuring the virtual Ethernet adapters of a virtual machine.
Operation |
HTTP request |
Description |
connect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet/{nic}/connect |
Connects a virtual Ethernet adapter of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. For a powered-off virtual machine, the update operation may be used to configure the virtual Ethernet adapter to start in the connected state when the virtual machine is powered on. |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet |
Adds a virtual Ethernet adapter to the virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet/{nic} |
Removes a virtual Ethernet adapter from the virtual machine. |
disconnect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet/{nic}/disconnect |
Disconnects a virtual Ethernet adapter of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the Ethernet adapter is not connected to its backing resource. For a powered-off virtual machine, the update operation may be used to configure the virtual Ethernet adapter to start in the disconnected state when the virtual machine is powered on. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet/{nic} |
Returns information about a virtual Ethernet adapter. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet |
Returns commonly used information about the virtual Ethernet adapters belonging to the virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/ethernet/{nic} |
Updates the configuration of a virtual Ethernet adapter. |
floppy
The floppy
service provides operations for configuring the virtual floppy drives of a virtual machine.
Operation |
HTTP request |
Description |
connect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/floppy/{floppy}/connect |
Connects a virtual floppy drive of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. For a powered-off virtual machine, the update operation may be used to configure the virtual floppy drive to start in the connected state when the virtual machine is powered on. |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/floppy |
Adds a virtual floppy drive to the virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/floppy/{floppy} |
Removes a virtual floppy drive from the virtual machine. |
disconnect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/floppy/{floppy}/disconnect |
Disconnects a virtual floppy drive of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the floppy drive is not connected to its backing resource. For a powered-off virtual machine, the update operation may be used to configure the virtual floppy floppy to start in the disconnected state when the virtual machine is powered on. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/floppy/{floppy} |
Returns information about a virtual floppy drive. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/floppy |
Returns commonly used information about the virtual floppy drives belonging to the virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/floppy/{floppy} |
Updates the configuration of a virtual floppy drive. |
memory
The memory
service provides operations for configuring the memory settings of a virtual machine.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/memory |
Returns the memory-related settings of a virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/memory |
Updates the memory-related settings of a virtual machine. |
parallel
The parallel
service provides operations for configuring the virtual parallel ports of a virtual machine.
Operation |
HTTP request |
Description |
connect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/parallel/{port}/connect |
Connects a virtual parallel port of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. For a powered-off virtual machine, the update operation may be used to configure the virtual parallel port to start in the connected state when the virtual machine is powered on. |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/parallel |
Adds a virtual parallel port to the virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/parallel/{port} |
Removes a virtual parallel port from the virtual machine. |
disconnect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/parallel/{port}/disconnect |
Disconnects a virtual parallel port of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the parallel port is not connected to its backing. For a powered-off virtual machine, the update operation may be used to configure the virtual parallel port to start in the disconnected state when the virtual machine is powered on. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/parallel/{port} |
Returns information about a virtual parallel port. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/parallel |
Returns commonly used information about the virtual parallel ports belonging to the virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/parallel/{port} |
Updates the configuration of a virtual parallel port. |
serial
The serial
service provides operations for configuring the virtual serial ports of a virtual machine.
Operation |
HTTP request |
Description |
connect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/serial/{port}/connect |
Connects a virtual serial port of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. For a powered-off virtual machine, the update operation may be used to configure the virtual serial port to start in the connected state when the virtual machine is powered on. |
create |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/serial |
Adds a virtual serial port to the virtual machine. |
delete |
DELETE https://{server}/rest/vcenter/vm/{vm}/hardware/serial/{port} |
Removes a virtual serial port from the virtual machine. |
disconnect |
POST https://{server}/rest/vcenter/vm/{vm}/hardware/serial/{port}/disconnect |
Disconnects a virtual serial port of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the serial port is not connected to its backing. For a powered-off virtual machine, the update operation may be used to configure the virtual serial port to start in the disconnected state when the virtual machine is powered on. |
get |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/serial/{port} |
Returns information about a virtual serial port. |
list |
GET https://{server}/rest/vcenter/vm/{vm}/hardware/serial |
Returns commonly used information about the virtual serial ports belonging to the virtual machine. |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/hardware/serial/{port} |
Updates the configuration of a virtual serial port. |
power
The power
service provides operations for managing the power state of a virtual machine.
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/power |
Returns the power state information of a virtual machine. |
reset |
POST https://{server}/rest/vcenter/vm/{vm}/power/reset |
Resets a powered-on virtual machine. |
start |
POST https://{server}/rest/vcenter/vm/{vm}/power/start |
Powers on a powered-off or suspended virtual machine. |
stop |
POST https://{server}/rest/vcenter/vm/{vm}/power/stop |
Powers off a powered-on or suspended virtual machine. |
suspend |
POST https://{server}/rest/vcenter/vm/{vm}/power/suspend |
Suspends a powered-on virtual machine. |
vcenter vm storage
vcenter vm storage policy
policy
The policy
service provides operations to configure the storage policies associated with the virtual machine home and/or its virtual disks. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
get |
GET https://{server}/rest/vcenter/vm/{vm}/storage/policy |
Returns Information about Storage Policy associated with a virtual machine's home directory and/or its virtual hard disks. This operation was added in vSphere API 6.7 |
update |
PATCH https://{server}/rest/vcenter/vm/{vm}/storage/policy |
Updates the storage policy configuration of a virtual machine and/or its associated virtual hard disks. This operation was added in vSphere API 6.7 |
compliance
The Compliance service provides operations that return the compliance status of virtual machine entities(virtual machine home directory and virtual disks) that specify storage policy requirements. This service was added in vSphere API 6.7
Operation |
HTTP request |
Description |
check |
POST https://{server}/rest/vcenter/vm/{vm}/storage/policy/compliance?action=check |
Returns the storage policy Compliance vcenter.vm.storage.policy.compliance.info of a virtual machine after explicitly re-computing compliance check. This operation was added in vSphere API 6.7 |
get |
GET https://{server}/rest/vcenter/vm/{vm}/storage/policy/compliance |
Returns the cached storage policy compliance information of a virtual machine. This operation was added in vSphere API 6.7 |
vcenter vm template
The vcenter.vm_template
API provides structures and services that will let its client manage VMTX template in Content Library.
library items
The library_items
service provides operations to deploy virtual machines from library items containing virtual machine templates, as well as operations to create library items containing virtual machine templates. The library_items
service also provides an operation to retrieve information about the template contained in the library item. Warning: This service is available as technical preview. It may be changed in a future release.
Operation |
HTTP request |
Description |
create |
POST https://{server}/rest/vcenter/vm-template/library-items |
Creates a library item in content library from a virtual machine. This operation creates a library item in content library whose content is a virtual machine template created from the source virtual machine, using the supplied create specification. The virtual machine template is stored in a newly created library item. Warning: This operation is available as technical preview. It may be changed in a future release. |
deploy |
POST https://{server}/rest/vcenter/vm-template/library-items/{template_library_item}?action=deploy |
Deploys a virtual machine as a copy of the source virtual machine template contained in the library item specified by template_library_item . It uses the deployment specification in spec . If vcenter.vm_template.library_items.deploy_spec.powered_on and/or vcenter.vm_template.library_items.deploy_spec.guest_customization are specified, the server triggers the power on and/or guest customization operations, which are executed asynchronously. Warning: This operation is available as technical preview. It may be changed in a future release. |
get |
GET https://{server}/rest/vcenter/vm-template/library-items/{template_library_item} |
Returns information about a virtual machine template contained in the library item specified by template_library_item . Warning: This operation is available as technical preview. It may be changed in a future release. |