7 asynchronous versus synchronous operations, 8 task resource, Backward compatibility – HP OneView User Manual

Page 79

Advertising
background image

Backward compatibility

The following list explains how to preserve your existing scripts when upgrading to a new version
of HP OneView, take advantage of new functionality, and find the current and previous versions
of the HP OneView REST API documentation.

Prevent scripts from breaking

To prevent your existing scripts from breaking that were written for a specific API version, use
the same X-API-Version value for that specific REST API. This ensures that the same set of
data is sent and returned in the response body during PUT and POST operations.

NOTE:

The set of possible enumerated values that may be returned in a given resource

attribute may be extended from release to release (independent of the API version). Clients
should ignore any values that they do not expect.

To maintain backward compatibility, the set of enumerated values will not be reduced and
the meaning of these values will not change for a given API version.

Use new functionality

To take advantage of new functionality, you must move to the new X-API-Version value.
If the X-API-Version value is set globally in your scripts, moving to a new X-API-Version
will likely impact multiple REST APIs. To view a list of REST APIs that have changed, see the
HP OneView Release Notes.

If you do not need to use the new functionality, you can use a previous X-API-Version and
avoid impacting your existing scripts. HP recommends that you move to the new
X-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 HP OneView REST API Reference
that is included on the appliance. To view previous versions of the REST API reference, go to

http://www.hp.com/go/oneview/docs

.

5.7 Asynchronous versus synchronous operations

A synchronous task returns a response after the REST API operation. For example, POST
/rest/server-profiles

returns a newly created server profile in the response body. An

asynchronous task, such as creating an appliance backup returns the URI of a TaskResource
resource model. You can use the TaskResource resource model URI to list the current status of
the operation.

5.8 Task resource

When you make an asynchronous REST API operation, HTTP status 202 Accepted is returned
and the URI of a TaskResource resource model is returned in the Location header of the
response.

5.7 Asynchronous versus synchronous operations

79

Advertising