Many methods on the platform offer a choice of JSON or XML formats for the data in the response message. Other methods send or accept other media types such as plain text or image files.

The Content-Type header specifies which of the accepted media types your app is sending, and the Accept header specifies which of the accepted media type choices you want for the response format.

Depending on your app and implementation, JSON or XML might be preferable. For example, if your app is browser-based, you might prefer JSON because it can easily be converted to JavaScript.

In some cases, operations might also allow, or might only allow, version-specific headers; for example, application/vnd.soa.v72+json, application/vnd.soa.v72+xml. In these cases, the request or response messages contain standard JSON or XML. The version-specific headers allow users to take advantage of version-specific feature enhancements associated with the API development.

Valid media types for each operation are listed in the documentation for the operation.

List of valid media types in the Enterprise API Platform API.

Related Topics