Retrieve Event and API Data
/mobile/system/analyticsExport/export/request
The Analytics Export API lets you return event data or API call metadata as a JSON object, which you can then import into a third-party tool.
Permissions
To access this operation, you must be a team member with the Analyst
role.
Request
- application/json
object
-
endDate(optional):
string
The ending date of the reporting period. Format:
YYYY-MM-DD
-
exportType:
string
Allowed Values:
[ "Events", "APICalls" ]
The type of data requested. UseEvents
for analytic events. UseAPICalls
to retrieve API call metadata. This is a required parameter. -
limit(optional):
integer
Minimum Value:
0
Maximum Value:1000
Default Value:1000
The number of events or API calls returned in the response. The default (and maximum) limit is1000
. The service applies this default value for requests that set limits higher than1000
. -
name(optional):
string
The name of an analytics event (defined in the app code) or an API call. If the
exportType
isAPICalls
, refer to the names listed in the menus for the API Endpoint reports. If it'sEvents
, then use the menus in Events report. -
offset(optional):
integer
Minimum Value:
0
Default Value:0
The zero-based index of the first item to return. -
startDate(optional):
string
The starting date of the reporting period. Format:
YYYY-MM-DD
{
"offset":0,
"endDate":"2018-05-12",
"exportType":"Events",
"name":"IncidentRaised",
"limit":2,
"startDate":"2018-04-12"
}
Response
- application/json
200 Response
object
-
hasMore(optional):
boolean
Whether there are more events. For the pagination.
-
items:
array items
Analytics events.
object
-
hasMore(optional):
boolean
Flag indicating if there are more items to be returned. The value is
true
if there are more items. -
items:
array items
API calls.
array
-
Array of:
object items
Analytic event.
object
-
backendName(optional):
string
The name of the backend that receives the events.
-
backendVersion(optional):
string
The version number of the backend that receives the events.
-
carrier(optional):
string
The mobile device's carrier.
-
component(optional):
string
The component name of the event.
-
country(optional):
string
The mobile device's GPS country.
-
customProperties(optional):
object customProperties
Additional Properties Allowed: additionalPropertiesThe custom properties defined for a custom event.
-
deviceId(optional):
string
The device ID of the event.
-
latitude(optional):
string
The mobile device's GPS latitude. The response might include
locality
,region
,postalCode
, andcountry
, in place of this value. -
locality(optional):
string
The mobile device's locality, such as city, township, or village.
-
longitude(optional):
string
The mobile device's GPS longitude. The response might include
locality
,region
,postalCode
, andcountry
, in place of this value. -
manufacturer(optional):
string
The mobile device's manufacturer.
-
mobileApplicationKey(optional):
string
A unique ID that associates the mobile app with a specific backend.
-
model(optional):
string
The mobile device's model name.
-
name(optional):
string
The event's name.
-
osBuild(optional):
string
The build of the mobile device's operating system.
-
osName(optional):
string
The name of the mobile device's operating system.
-
osVersion(optional):
string
The version of the mobile device's operating system.
-
postalCode(optional):
string
The mobile device's postal code.
-
region(optional):
string
The mobile device's region, such as state, canton, or province.
-
sessionID(optional):
string
The session ID associated with the event.
-
timestamp(optional):
string
The timestamp that marks the creation of the event, as specified in RFC 3339 format as UTC.
-
timezone(optional):
string
The mobile device's offset, in seconds, from UTC.
-
type(optional):
string
The type of event, such as
custom
for custom events, orsystem
forcontext
,sessionStart
, andsessionEnd
events. If omitted, the event is considered to be a custom event. -
userName(optional):
string
The user name for the signed-in user.
object
object
-
apiImplementationName(optional):
string
The name of the API implementation.
-
apiImplementationVersion(optional):
string
The API implementation's version.
-
apiName(optional):
string
The API that was called.
-
apiVersion(optional):
string
The API's version.
-
backendName(optional):
string
The name of the backend that the call was sent to.
-
backendVersion(optional):
string
The backend's version.
-
ecid(optional):
string
The Execution Context ID (ECID) that's assigned to the API call. The ECID is a globally unique identifier used to correlate events or requests with a transaction occurring within the Oracle technology stack.
-
executionTime(optional):
string
The time (in milliseconds) that the service spends processing an API Call, beginning when the service receives the request and ending when the data is returned to the app.
-
parameters(optional):
object parameters
Additional Properties Allowed: additionalProperties
-
requestMethod(optional):
string
The API call's request method, such as
POST
. -
requestTime(optional):
string
The timestamp that notes when the service received the API call, expressed as
YYYY-MM-DD
. -
resourcePath(optional):
string
The URI in the API call.
-
responseCode(optional):
string
The HTTP status response code, such as
202
. -
responseErrorId(optional):
string
The ID of the error message that's returned for failed API requests.
-
responseErrorMessage(optional):
string
A brief message describing why a request failed.
-
responseMessage(optional):
string
The message describing the HTTP response code.
-
rid(optional):
string
The Relationship ID (RID) for the execution context associated with the API Call. The RID tracks any sub-requests called by the service.
-
type(optional):
string
Allowed Values:
[ "UnserviceableREST", "UnserviceableINTERNAL", "ServiceableREST", "ServiceableINTERNAL" ]
The type of API call. Note thatServiceable
indicates that the API call was accepted for processing. It may eventually be successful or unsuccessful, the status for which is present in other properties.Unserviceable
indicates that the API call couldn't be accepted for processing. Typically, all API calls with a 4XX HTTP status fall into this category.REST
indicates that the API call originated from outside the service.INTERNAL
indicates that the API call originated from within the instance.
{
"hasMore":true,
"items":[
{
"country":"US",
"osBuild":"13E28",
"mobileApplicationKey":"cd4b13b5-608c-4a18-9ef4-341fe4873063",
"timezone":"-14400",
"backendversion":"1.0",
"postalCode":"95549",
"locality":"San Francisco",
"sessionID":"2d64d3ff-25c7-4b92-8e49-21884b3495ce",
"osName":"iPhone OS",
"userName":"JDoe123",
"type":"custom",
"deviceId":"cd4b13b5-608c-4a18-9ef4-asdfasd",
"manufacturer":"Apple",
"component":"Incidents",
"carrier":"AT&T",
"customProperties":{
"Appliance Manufacturer":"Tall Manufacturing",
"Model Number":"M1234"
},
"osVersion":"7.1",
"name":"IncidentRaised",
"model":"iPhone5,1",
"backendName":"FixitFastCustomer",
"region":"CA",
"timestamp":"2018-04-12T23:20:56.523Z"
},
{
"osBuild":"13E28",
"mobileApplicationKey":"cd4b13b5-608c-4a18-9ef4-341fe4873063",
"timezone":"-14400",
"backendversion":"1.0",
"latitude":"37.35687",
"sessionID":"2d64d3ff-25c7-4b92-8e49-21884b3495ce",
"osName":"iPhone OS",
"userName":"JDoe123",
"type":"custom",
"deviceId":"cd4b13b5-608c-4a18-9ef4-asdfasd",
"manufacturer":"Apple",
"component":"Incidents",
"carrier":"AT&T",
"customProperties":{
"Appliance Manufacturer":"Tall Manufacturing",
"Model Number":"M1234"
},
"osVersion":"7.1",
"name":"IncidentRaised",
"model":"iPhone5,1",
"backendName":"FixitFastCustomer",
"longitude":"-122.11663",
"timestamp":"2018-04-13T23:20:56.523Z"
}
]
}
400 Response
object
Error
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
The service's error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
array
0
-
Array of:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Examples
The following example shows request for a page of the analytic events that occurred during the specified date range. For more information about cURL, see Use cURL.
curl -i -X POST -u mobile.user@example.com:password -H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce" -H "content-type: application/json" -d '{"exportType": "events", "startDate": "2013-04-12", "endDate": "2014-04-12", "offset": 100, "limit": 10}' https://fif.cloud.oracle.com/mobile/system/analyticsExport/export/request
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Date: Wed, 18 Nov 2015 21:46:57 GMT Content-Length: 2731 Content-Type: application/json
Example of Response Body
The following example shows, in JSON format, the contents of the response body:
{ "items":[ { "name":"Sell447", "type":"custom", "timestamp":"2013-05-12 18:20:55.052", "sessionId":"1cf517db-5a49-4d47-b207-b2357f261d48", "backendName":"myBackend", "backendVersion":"1.0" }, { "name":"Purchase448", "type":"custom", "timestamp":"2013-05-13 00:20:55.052", "sessionId":"9e8e72e2-8a69-4c1a-9596-4de1ec6b2be1", "backendName":"myBackend", "backendVersion":"1.0", "customProperties":{ "cartPrice":"$50,000", "cartContent":"car", "uniqueKey":"Purchase448" } } ], "hasMore":true }
The following example shows request for a page of the API calls that occurred on or after the specified date.
curl -i -X POST -u mobile.user@example.com:password -H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce" -H "content-type: application/json" -d '{"exportType": "APICalls", "startDate": "2015-11-15", "offset": 0, "limit": 10}' https://fif.cloud.oracle.com/mobile/system/analyticsExport/export/request
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Date: Wed, 18 Nov 2015 21:46:57 GMT Content-Length: 459 Content-Type: application/json
Example of Response Body
The following example shows, in JSON format, the contents of the response body:
{ "items":[ { "type":"ServiceableREST", "ecid":"51a69c67-e958-4fc3-a42c-800b9c469d58-00000ee5", "rid":"0", "requestTime":"2015-11-19 04:59:13.32", "requestMethod":"POST", "apiName":"analytics", "apiVersion":"1.0", "apiImplementationName":"analytics", "apiImplementationVersion":"1.0", "executionTime":"258", "backendName":"myBackend", "backendVersion":"1.0", "responseCode":"202", "resourcePath":"/events" } ], "hasMore":false }