A HTTP Headers
You use headers to provide information (metadata) about the request or response or about the data contained in the message body. Oracle Mobile Cloud Service (MCS) provides custom request and response headers that you can use with the connector APIs and in custom code. The HTTP headers, their descriptions, and the services that use them are described in this chapter.
For detailed descriptions of standard HTTP headers, see Header Field Definitions.
API Headers
The following table lists the custom HTTP headers listed used by Oracle Mobile Cloud Service (MCS) custom APIs and connector APIs.
Header | Description | API |
---|---|---|
|
The version of the connector or custom API that is called from a custom API implementation. Use this header when the dependency isn't declared in |
Custom API REST and SOAP Connector APIs |
|
The ID of the mobile backend issued by MCS, which enables a mobile application to access APIs associated with that mobile backend. This header is required when you are using the HTTP Basic Authentication. The value of the ID (for the given environment) is displayed in the Keys section of the Mobile Backends page. |
Custom API |
|
The request header used when a security policy isn’t configured for the connector. When this header is set, the value of the header is set as Authorization on the request to the external service. Set the |
REST Connector API |
SDK Headers
The public HTTP headers listed in the following table are used in the iOS and Android SDKs to write calls in your app to mobile backend services.
Header names are case-insensitive and used the same way on both platforms. If you choose to write custom headers, then they must begin with Oracle-Mobile-
.
Header | Description | Service |
---|---|---|
|
For OAuth and SSO, contains the OAuth token downloaded from the OAuth Server. For HTTP Basic and Facebook, contains the Base64 encoding of the user name and password. |
Security |
|
The current session to track events. |
Analytics |
|
The Application ID that’s used to differentiate various applications. |
Analytics and Others |
|
The ID of the mobile backend issued by MCS, which enables a mobile application to access APIs associated with that mobile backend. This header is required when you’re using the HTTP Basic authentication or Facebook login. The value of the ID (for the given environment) is displayed in the Keys section of the Mobile Backends page. |
Security |
|
The canonical link for the object. |
Storage |
|
The client timestamp at which the request is made. The timestamp is in UTC in the format yyyy'-'MM'-'dd'-T'HH':'mm':'ss':SSS'Z. |
Diagnostics |
|
Arequest for the value of the |
Storage |
|
The user who initially created the object. Corresponds to the |
Storage |
|
The |
Storage |
|
The Device ID that’s used to differentiate various mobile devices. |
Storage and Others |
|
A unique ID to represent a user app session. This is different from an Analytics session in terms of lifetime. The SDK uses the process ID (OS PID) for the header value. |
Diagnostics |
|
Addition of a set of predefined columns like |
Database |
|
The user who last modified the object. Corresponds to the |
Storage |
|
The |
Storage |
|
The display name for the object. Corresponds to the |
Storage |
|
Addition of a primary key to implicitly created schema. |
Database |
|
The self link for the object. |
Storage |
|
For Facebook login, contains the Facebook access token. |
Security |
|
For Facebook login, contains the value |
Security |
|
Optional. The specification of when a returned resource should be evicted from the cache, if set. Uses RFC 1123 |
Synchronization |
|
Optional. The specification of when a returned resource should expire in the cache, if set. Uses RFC 1123 |
Synchronization |
|
If set to |
Synchronization |
|
An For collections, the JSON must conform to the collection envelope structure. This is the custom header defined by the Synchronization service. See Defining Synchronization Policies and Cache Settings in a Response Header for details. |
Synchronization |
|
Optional. Informs a sync-compatible service (like Storage) to generate compatible collection formats. The value of the header is not critical but the client will set it to |
Synchronization |