Skip to content
Mobile SDK
Visit Mobile SDK on GitHub
Set theme to dark (⇧+D)

Logpull API

Cloudflare Mobile SDK Logpull is a REST API providing raw logs.

Requesting logs

Endpoint(s)

  • GET /mobilesdk/logs/logpull - returns Mobile SDK metrics log data based on specified parameters

Required authentication headers

The following headers are required for all endpoint calls:

  • X-Auth-Email - the Cloudflare Account Email Address
  • X-Auth-Key - the Cloudflare Global API Key Please note that the Email Address is one that registered in Cloudflare Dashboard (dash.cloudflare.com), not Cloudflare Mobile SDK Portal (mobilesdk.cloudflare.com). The Global API Key can also be obtained from Profile page of Cloudflare Dashboard.

Parameters

ParameterDescriptionRequired
start- Inclusive
- Accept either RFC3339 (2019-01-01T00:00:00Z) or unix time (1546300800, in seconds)
- Must be no more than 7 days earlier than now
yes
end- Exclusive
- Accept either RFC3339 (2019-01-01T00:00:00Z) or unix time (1546300800, in seconds)
- Difference between start and end should not exceed 1hr
yes
clientKey- Your App's Client Key (can be obtained from the Mobile SDK Portal)yes
count- Return up to that many records
- Do not include if returning all records
no
timestamps- Format in which timestamp fields will be returned
- Value options are: unixnano (default), unix, rfc3339, rfc3339nano
- Timestamps retuned as integers for unix and unixnano and as strings for rfc3339
no

Example

curl -s \    -H 'X-Auth-Email: <REDACTED>' \    -H 'X-Auth-Key: <REDACTED>' \    'https://api.cloudflare.com/client/v4/mobilesdk/logs/logpull?start=2019-02-19T22:00:00Z&end=2019-02-19T22:01:00Z&clientKey=<REDACTED>&count=10&timestamps=rfc3339nano'
  • Add -H 'Accept-Encoding: gzip' for gzip compressed response

Fields

FieldValueType
timestampunix / unixnano (int) or rfc3339 / rfc3339nano (string) format timestamptimestamp
clientIPCountry of the client IP addressstring
deviceIdDevice ID (Cloudflare Mobile SDK Generated ID)string
modelClient devicestring
osClient OSstring
osVerClient OS versionstring
appVerApp versionstring
sdkVerCloudflare Mobile SDK versionstring
netOpClient network operator (Carrier)string
netTypemobile | wifi | unknownstring
netSubTypeunknown | gprs | edge | umts | cdma | evdo_0 | evdo_a | 1xrtt | hsdpa | hsupa | hspa | iden | evdo_b | lte | ehrpd | hspap | gsm | wcdmastring
sdkErrorCodeDetailed Mobile SDK Error Code, 0 (no error) | other_values (error)
for details, See iOS Error Codes / Android Error Codes
int
httpshttp | httpsstring
rayIdID of the requeststring
coloNameCloudflare edge colo name (airport code)string
cacheStatusunknown | miss | expired | updating | stale | hit | ignored | bypass | revalidated | nonestring
hostHost requested by the clientstring
pathURI path requested by the clientstring
rcClientHTTP status code returned by Cloudflare to the clientint
httpMethodHTTP method of client requeststring
ttfbTimeMsTTFB in millisecondsint
totalTimeMsTotal time taken in millisecondsint
inBytesDownload size in bytesint
outBytesUpload size in bytesint
countryCountry of the client IP addressstring
asNumClient AS numberint
viewNameView controller namestring
isAcceleratedaccelerated_fallback | accelerated_tcp | accelerated_asap | not_accelerated | errorstring
isErrorerror | empty_string (no error)string

Tips for stats

  • Performance
    • Median Total Time can be obtained by calculating median of sdkErrorCode = 0 and rcClient = 2xx
    • A/B comparison can be done using isAccelerated field values, 'accelerated_*' (for accelerated traffic) Vs. 'not_accelerated' (for traffic that are not accelerated)
  • Errors
    • Error counts can be obtained by counting isError = 'error'
    • A/B comparison can be done using isAccelerated field values, 'accelerated_*' (for accelerated traffic) Vs. 'not_accelerated' (for traffic that are not accelerated)

Limits

  • SDK Version: Log data only available with Cloudflare Mobile SDK version 3.0.0 or later installed
  • Retention period: 7 days
  • Maximum time range (difference between start and end parameters): 1 hour
  • Response size: the maximum response size is 10GiB per request
  • Timeout: the response will fail with a terminated connection after 10 minutes
  • Rate Limits: 60 requests/min per user (email address)