Additional Information
This chapter describes the following information that can be used as a reference:
- Supported headers
- HTTP response codes
- Error messages
Supported Headers
The supported headers are as follows:
- Content-Type: A REST API can interpret the following media types:
Media Type Description application/vnd.oracle.adf.resourcecollection+json
Represents a collection resource, such as opportunities. application/vnd.oracle.adf.resourceitem+json
Represents a resource item, such as one opportunity. application/vnd.oracle.adf.action+json
Describes an action. application/vnd.oracle.adf.actionresult+json
Describes the result of an action. application/vnd.oracle.adf.description+json
Indicates the metadata of the resource. application/vnd.oracle.adf.batch+json
Supports a batch request. - Content-Encoding: A REST API can parse a compressed request that uses the following encoding:
Encoding Description Identity This encoding doesn't compress the payload. It has the same behavior when the encoding is omitted. x-gzip (and gzip) An encoding format produced by the file compression program gzip (GNU zip) as described in RFC 1952. This format is a Lempel-Ziv coding (LZ77) with a 32-bit Cycle Redundancy Check (CRC). Deflate The zlib format defined in RFC 1950 in combination with the deflate compression mechanism described in RFC 1951. - Accept: The content-type that is acceptable to the response.
- Accept-Encoding: The encoding that is acceptable to the response.
- Location: When a new resource is created, a location header is included in the response to indicate the URL of the newly created resource.
- ETag: ETag is generated if the resource has a change indicator. The client can use ETag for caching control.
- If-Match: This header is supported to execute conditional requests.
- If-None-Match: This header is supported to execute conditional requests.
- X-HTTP-Method-Override: This is a custom header (not in the HTTP specifications) that contains the name of a HTTP method as value. This value (if valid) is used to define the HTTP method. This header will only be considered in a POST request.
- Cache-Control: To avoid intermediate proxies to cache/store framework payloads, this header is being configured for every HTTP response. Its value is: no-cache, no-store, must-revalidate.
- X-Requested-By: When the anti-CSRF mechanism is turned on, the presence of this header is enforced for every request, except when the following methods are being used: GET, OPTIONS and HEAD. If the header isn't found, then the response, 400 (Bad Request), is returned.
HTTP Response Codes
The following table lists the common HTTP response codes.
Code | Description |
---|---|
200 OK |
The request was executed and the response has content. |
201 Created |
The resource was created. The response contains the created resource. |
204 No Content |
The request executed, but the response doesn't have content. |
304 Not Modified |
The resource wasn't modified according to the ETag that was provided.. |
400 Bad Request |
The request to the server failed because of malformed syntax. |
404 Not Found |
The requested resource wasn't found. |
406 Not Acceptable |
The resource identified by the request can generate response entities that have content characteristics that aren't acceptable, according to the accept headers sent in the request. |
412 Precondition failed |
The resource state on the server side doesn't match the provided ETag. |
415 Unsupported Media Type |
The server failed to service the request because the entity of the request is in a format that's not supported by the requested resource for the requested method. |
500 Internal Server Error |
The server encountered an unexpected condition that prevented it from fulfilling the request. |
Error Messages
If a REST request generates an error, then the response contains the error code and a short error message in the response's status line. A detailed error message is included in the response body.