F Response Headers

REST APIs support a variety of HTTP headers.

The REST API supports the HTTP response headers listed in the following table.

Table F-1 HTTP Headers Supported by REST APIs

HTTP Header Name Description

Content-Type

Use to specify the content-type of the request/response payload. The REST API runtime is able to interpret (request/response) the media types, as described in Media Types.

Accept

Use to specify the expected content-type of the response payload. The REST API runtime is able to interpret (request/response) the media types, as described in Media Types.

REST-Framework-Version

Use to specify the version of the REST API framework to use to process the request. The REST API framework version passed in the version header overrides the default framework declaration defined by the web application, as described in About REST API Framework Versions.

Location

Use to identify the URI of a newly created business object. The REST API framework includes the Location header in the response of a POST to create a new business object. For an example, see Creating a Business Object Item.

ETag

Use to compare the state of the business object in a request with the state of business object on the server. The REST API framework supports the ETag generation for business objects that has been configured to use an change-indicator attribute. See About Data Consistency.

If-Match

Use to determine whether the state of the business object in a request is current with the business object on the server. This header is supported in order to execute conditional requests. See About Data Consistency.

If-None-Match

Use to determine whether the state of the business object in a request does not match the current state on the server. This header is supported in order to execute conditional requests. See About Data Consistency.

Upsert-Mode

Use Upsert-Mode: true in a request that uses POST to create a business object item if the item does not exist, or update a business object item if the item exists. Note that a POST request with Upsert-Mode:false behaves as a POST without the custom header and performs the CREATE operation exclusively.