Exporting raw reports
Learn about exporting raw reports in the IBM MobileFirst™ Platform Operational Analytics.
Exporting from the Administration page
The Administration page
allows you to export all of the data stored in the analytics platform
in one of the following formats:
When an event type is selected from the user interface, you
will have the option to select Advanced Settings.
These settings allow you to apply additional filters to the data you
are exporting.
- JSON
- CSV
- XML
Option name | Description |
---|---|
Event Type | Name of the event that data will be exported from. For specific information about each of the events, see Event types. |
Date Range | Start and end date for exporting data. |
Limit | Number of analytics documents returned. |
Offset | Number of documents to skip before exporting. |
Data Format | Format data is exported in (JSON, CSV, or XML). |
Exporting custom data
The following example
shows the format for exporting analytics data for custom data in JSON:
/administration/apps/{tenant}/export?query={"event":"CustomData","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","mfpAppName":"*","mfpAppVersion":"*","deviceOS":"*","deviceOSversion":"*","deviceModel":"*","serverIpAddress":"*"}
If
the analytics console is hosted here:
http://hostname.ibm.com:9080
by
using the curl command-line tool, the following curl command exports
data from the worklight tenant for all versions of
the TestApp application. Data is returned for only
data for the iPhone environment, for all models of the iPhone, and
only for iOS 7.0. The first 100 results that are found and start with
the first result (limit = 100, offset = 0) are returned.
Replace
the relevant values:curl -XGET -G 'http://hostname.ibm.com::9080/analytics-service/data/administration/apps/worklight/export'
--data-urlencode 'query={"event":"ServerLogs","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","serverIpAddress":"*","level":"*"}' -u <username>:<password> -o <output_file_name>
- <username>:<password>: your MobileFirst admin user name and password.
- <output_file_name>: the output file name.
Note: The default tenant is worklight. If you
did not configure a specific tenant for the IBM MobileFirst Platform Operational
Analytics,
then you can use the worklight tenant. If you want
to see data that occurred in a specific time range, specify a startDate time
stamp in milliseconds and an endDate time stamp in
milliseconds.
Exporting server push notifications
The
following example shows the format for exporting analytics data for
server push notifications:
/administration/apps/{tenant}/export?query={"event":"ServerPushNotifications","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","mfpAppName":"*","mfpAppVersion":"*","mediator":"*","serverIpAddress":"*"}
For
example, by using the curl command-line tool, the following curl command
exports data:
curl -XGET -G 'http://hostname.ibm.com:9080/analytics-service/data/administration/apps/worklight/export ' --data-urlencode
'query={"event":"ServerPushNotifications","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","mfpAppName":"*","mfpAppVersion":"*","mediator":"*","serverIpAddress":"*"}' -u <username>:<password> -o <output_file_name>
Exporting server logs
The following example
shows the format for exporting analytics data for server logs:
/administration/apps/{tenant}/export?query={"event":"ServerLogs","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","serverIpAddress":"*","level":"*"}
For
example, by using the curl command-line tool, the following curl command
exports data:
curl -XGET -G 'http://hostname.ibm.com:9080/analytics-service/data/administration/apps/worklight/export ' --data-urlencode
'query={"event":"ServerLogs","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","serverIpAddress":"*","level":"*"}' -u <username>:<password> -o <output_file_name>
Note: Valid
log levels for server logs include: FATAL, ERROR, WARN, INFO, LOG,
DEBUG, and TRACE.
Exporting client logs
The following example
shows the format for exporting analytics data for client logs:
/administration/apps/{tenant}/export?query={"event":"MfpAppLogs","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","mfpAppName":"*","mfpAppVersion":"*","deviceOS":"*","deviceOSversion":"*","deviceModel":"*","level":"*"}
For
example, by using the curl command-line tool, the following curl command
exports data:
curl -XGET -G 'http://hostname.ibm.com:9080/analytics-service/data/administration/apps/worklight/export ' --data-urlencode
'query={"event":"MfpAppLogs","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","mfpAppName":"*","mfpAppVersion":"*","deviceOS":"*","deviceOSversion":"*","deviceModel":"*","level":"*"}' -u <username>:<password> -o <output_file_name>
Note: Valid
log levels for client logs include: ANALYTICS, FATAL, ERROR, WARN,
INFO, LOG, DEBUG, and TRACE.
Exporting server network transactions
The
following example shows the format for exporting analytics data for
server network transactions:
/administration/apps/{tenant}/export?query={"event":"ServerNetworkTransactions","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","mfpAppName":"*","mfpAppVersion":"*","deviceOS":"*","deviceOSversion":"*","deviceModel":"*","adapterName":"*","procedureName":"*","serverIpAddress":"*"}
For
example, by using the curl command-line tool, the following curl command
exports data:
curl -XGET -G 'http://hostname.ibm.com:9080/analytics-service/data/administration/apps/worklight/export ' --data-urlencode
'query={"event":"ServerNetworkTransactions","format":"json","limit":10,"offset":0,"startDate":"*","endDate":"*","mfpAppName":"*","mfpAppVersion":"*","deviceOS":"*","deviceOSversion":"*","deviceModel":"*","adapterName":"*","procedureName":"*","serverIpAddress":"*"}' -u <username>:<password> -o <output_file_name>
Note: Valid
log levels for client logs include: ANALYTICS, FATAL, ERROR, WARN,
INFO, LOG, DEBUG, and TRACE.