Retrieve Event and API Data

post

/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

Supported Media Types
Body ()
Root Schema : exportRequest
Type: object
The export request.
Show Source
  • The ending date of the reporting period. Format: YYYY-MM-DD
  • Allowed Values: [ "Events", "APICalls" ]
    The type of data requested. Use Events for analytic events. Use APICalls to retrieve API call metadata. This is a required parameter.
  • 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 is 1000. The service applies this default value for requests that set limits higher than 1000.
  • The name of an analytics event (defined in the app code) or an API call. If the exportType is APICalls, refer to the names listed in the menus for the API Endpoint reports. If it's Events, then use the menus in Events report.
  • Minimum Value: 0
    Default Value: 0
    The zero-based index of the first item to return.
  • The starting date of the reporting period. Format: YYYY-MM-DD
Example Request (application/json)
{
    "offset":0,
    "endDate":"2018-05-12",
    "exportType":"Events",
    "name":"IncidentRaised",
    "limit":2,
    "startDate":"2018-04-12"
}
Back to Top

Response

Supported Media Types

200 Response

The information was retrieved successfully.
Body ()
The export response.
Root Schema : exportResponse
Type: object
The export response.
Match One
Show Source
Nested Schema : analyticsEvents
Type: object
Show Source
Nested Schema : apiCalls
Type: object
Show Source
Nested Schema : items
Type: array
Analytics events.
Show Source
Nested Schema : items
Type: object
Analytic event.
Show Source
Nested Schema : customProperties
Type: object
Additional Properties Allowed
Show Source
The custom properties defined for a custom event.
Show Source
Nested Schema : items
Type: array
API calls.
Show Source
Nested Schema : items
Type: object
API call.
Show Source
Nested Schema : parameters
Type: object
Additional Properties Allowed
Show Source Show Source
Example Response (application/json)
{
    "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

The request failed because the request body is not well-formed JSON, or because an exception occurred during processing.
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Back to Top

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
}
Back to Top