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 MobileEnvironment_Analytics 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`. MCS applies this default value for requests that set limits higher than `1000`.
  • The name of an analytics event (defined in the mobile 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)
{
    "limit":2,
    "startDate":"2015-04-12",
    "name":"IncidentRaised",
    "exportType":"Events",
    "endDate":"2015-05-12",
    "offset":0
}
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":[
        {
            "region":"CA",
            "model":"iPhone5,1",
            "osVersion":"7.1",
            "mobileApplicationKey":"cd4b13b5-608c-4a18-9ef4-341fe4873063",
            "customProperties":{
                "Appliance Manufacturer":"Abc Corp",
                "Model Number":"M1234"
            },
            "type":"custom",
            "country":"US",
            "timestamp":"2013-04-12T23:20:56.523Z",
            "timezone":"-14400",
            "sessionID":"2d64d3ff-25c7-4b92-8e49-21884b3495ce",
            "postalCode":"95549",
            "component":"Incidents",
            "backendversion":"1.0",
            "manufacturer":"Apple",
            "name":"IncidentRaised",
            "userName":"JDoe123",
            "locality":"San Francisco",
            "carrier":"AT&T",
            "backendName":"FixitFastCustomer",
            "osName":"iPhone OS",
            "deviceId":"cd4b13b5-608c-4a18-9ef4-asdfasd",
            "osBuild":"13E28"
        },
        {
            "model":"iPhone5,1",
            "osVersion":"7.1",
            "mobileApplicationKey":"cd4b13b5-608c-4a18-9ef4-341fe4873063",
            "customProperties":{
                "Appliance Manufacturer":"Abc Corp",
                "Model Number":"M1234"
            },
            "type":"custom",
            "timestamp":"2013-04-13T23:20:56.523Z",
            "timezone":"-14400",
            "sessionID":"2d64d3ff-25c7-4b92-8e49-21884b3495ce",
            "backendversion":"1.0",
            "component":"Incidents",
            "manufacturer":"Apple",
            "name":"IncidentRaised",
            "userName":"JDoe123",
            "carrier":"AT&T",
            "longitude":"-122.11663",
            "latitude":"37.35687",
            "backendName":"FixitFastCustomer",
            "osName":"iPhone OS",
            "deviceId":"cd4b13b5-608c-4a18-9ef4-asdfasd",
            "osBuild":"13E28"
        }
    ]
}

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 Mobile Cloud Service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
List of the issues that cause the error. 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 analyst@example.com:mypassword
-H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce"
-H "content-type: application/json" 
-d '{"exportType": "events", "startDate": "2017-04-12", "endDate": "2018-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 2018 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":"2017-05-12 18:20:55.052",
      "sessionId":"1cf517db-5a49-4d47-b207-b2357f261d48",
      "backendName":"myBackend",
      "backendVersion":"1.0"
    },
    {
      "name":"Purchase448",
      "type":"custom",
      "timestamp":"2017-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:mypassword
-H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce"
-H "content-type: application/json" 
-d '{"exportType": "APICalls", "startDate": "2017-11-17", "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 2018 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":"2017-11-17 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