This section provides details about the versioning of the Rhapsody REST API. It includes examples of how to call the most recent version of a REST API method and how to call a previous version.

REST API Versioning

The Rhapsody REST API has been versioned as of Rhapsody 6.0 in order to provided backwards compatibility of the REST API methods should they be required in the future. Versioning has been added by including the version information in the Internet Media Type. The version number is of the form major_minor (for example, 6_0) and represents the response format version at the time the a REST API method was introduced. If there are no format changes, the REST API version remains the same unless the API has also changed.

The caller specifies the Media Type in the Accept field of the Request Header to specify the format they want to receive the data in, for example:

Accept: application/vnd.orchestral.rhapsody.6_0+json

The REST API methods with the return type of HTML or those which return a single number value have not been versioned. It is bad practice to depend on results returned in HTML format. Instead, the REST API method which returns JSON format should be used if further processing of the results is required.

Calling a Versioned REST API Method

To call the current and most recent version of a REST API method omit the version information from the request, for example:

Accept: application/json

To call a specific version of a REST API method, include the version information in the Accept and Content-Type headers of the request where applicable, for example:

Accept: application/vnd.orchestral.rhapsody.6_0+json

For documentation regarding previous versions of REST API methods, refer to the relevant product documentation for that Rhapsody version.