When you perform a REST API operation, an X-API-Version header is required. This version header corresponds to the REST API version of software currently running on the appliance. To determine the current REST API version on a given appliance, perform GET /rest/version. This GET operation does not require an X-API-Version header. If multiple appliances are running in your environment, you need to determine the REST API version required by each appliance.
|
|
|
![]() |
NOTE: If an |
|
|
The requests documented in the HPE OneView REST API Scripting Help correspond to the API Reference version included in the product.
Supported REST API versions
This release of HPE OneView supports the latest REST API version in addition to supporting the REST API versions supported in previous releases of HPE OneView.
Backward compatibility
The following list explains how to preserve your existing scripts when upgrading to a new version of HPE OneView, take advantage of new functionality, and find the current and previous versions of the HPE OneView REST API documentation.
-
To prevent your existing scripts from breaking that were written for a specific API version, use the same
X-API-Versionvalue for that specific REST API. This ensures that the same set of data is sent and returned in the response body duringPUTandPOSToperations.
![[NOTE: ]](images/note.gif)
NOTE: The Index or SCMB always returns the latest version of resource data, independent of what is sent in the
X-API-Versionheader on the request (this header controls the Index DTO model, but not the data contained within). To obtain a specific version of a resource’s data, perform aGETon the resource’s URI with the desiredX-API-Versionheader.
-
To take advantage of new functionality, you must move to the new
X-API-Versionvalue. If theX-API-Versionvalue is set globally in your scripts, moving to a newX-API-Versionwill likely impact multiple REST APIs. To view a list of REST APIs that have changed, see the "What's New?" page in the HPE OneView API Reference.If you do not need to use the new functionality, you can use a previous
X-API-Versionand avoid impacting your existing scripts. Hewlett Packard Enterprise recommends that you move to the newX-API-Version, because backward compatibility is not guaranteed from release to release, and older functionality will be deprecated.The current version of the REST APIs are documented in the HPE OneView API Reference that is included on the appliance. To view previous versions of the reference, go to www.hpe.com/info/oneview/docs.