C Media Types

Media types, also called MIME types or content types, define the allowed resource structure of the payload exchanged between the client and server. All REST API media types are based on JSON. Resources accessed in the web application fall under the application type and json subtype.

REST APIs use one of the media types listed in the table below. The types are defined such that the media type does not vary with the business object backing the resource. Note that the value of the accept header depends on the context of the invocation. Links to the JSON token structure of the REST API media types are provided in the following table.

Note:

As an alternative to specifying the supported media types, request accept headers passed with the REST API call can specify application/json when a superset of all supported media types may be accepted in the response.

Table C-1 Media Types Supported by REST APIs

Media Type Invocation Context Description

application/vnd.oracle.adf.resourcecollection+json

GET method

Represents the format for all resource collections returned by the REST API call.

All attributes are automatically generated by the framework. Only the content of the items attribute is based on the resource definition.

For an example, see Describing a Resource Collection.

application/vnd.oracle.adf.resourceitem+json

GET method

POST method

PATCH method

Represents the format for all resource items returned by the REST API call. Also represents the format for a resource item in a POST or PATCH request payload. Also represents the format for a resource item in a POST or PATCH request payload.

Only the attribute links is automatically generated by the framework. All the other attributes are based on the resource definition.

application/vnd.oracle.adf.description+json

GET method

Describes the resource and its elements.

For an example, see Retrieving the Resource Catalog Describe

application/vnd.oracle.adf.batch+json

POST method

Describes a set of operations to be performed, where the operation consists of a set of parts and each part represents a request. The batch request is executed in one single transaction.

For an example, see Making Batch Requests.

application/vnd.oracle.adf.error+json

any

Describes the exception payload error response for a request made with an error.

To use this media type and obtain the exception details in an error response payload, the request must be made with REST API framework version 4 (or later) enabled.

For an example, see Obtaining an Exception Payload Error Response.