The mobile crash API is a RESTful way to retrieve information about your mobile application crashes that have been reported to New Relic. It brings together the attributes and thread data available for a given set of crash types and occurrences.
You can use the API to:
GET your most recent crash types GET a list of occurrence IDs from a single crash type GET Thread, Library and Attributes for a particular occurrence ID Contents Prerequisites To use the Crash API in these examples, you need:
Your New Relic Crash API Key. Pass this key as the value of the X-API-KEY header. Your New Relic account ID Your mobile monitoring application ID For example:
https://rpm.newrelic.com/accounts/{account_ID}/mobile/{mobile_application_ID}
Tip Note : X-API-KEYs are rate limited to 600 requests per minute.
GET mobile-crashes/ Purpose: Returns the most recent crash types.
Resource Resource URL:
https://mobile-data-api.newrelic.com/v1/mobile-crashes/{account_id}/{mobile_application_id}
URL parameters:
Name
Default
Example
size
Optional: The number of crash types to be returned.
25
100
sort
Optional: The order of the results sorted on a particular property: recent, occurrence-count, users-affected.
recent
occurrence-count
startTime
Optional: Epoch timestamp in ms. Defines the time window for data retrieval.
60 minutes ago
1479592610148
endTime
Optional: Epoch timestamp in ms. Defines the time window for data retrieval.
now
1480530548906
Response crash_type object Element
Type
Description
crashFingerprint
string
The defining identifier for the crash type.
crashLocation
string
Formatted crash location string. Same as in the UI. Generally human readable, but if no symbols are available it may be only memory addresses.
firstSeen
long
Epoch timestamp, in milliseconds. Indicates when the crash was first recorded.
lastSeen
long
Epoch timestamp, in milliseconds. Indicates when the crash was most recently recorded.
usersAffected
long
Count of the number of users that have experienced the crash.
occurrenceCount
long
Count of crash occurrences.
crashLocationFile
string
The file the crash occurred in.
May be null.
crashLocationLineNumber
long
The line number the crash occurred on.
May be 0.
crashLocationMethod
string
The method the crash occurred in.
May be null.
crashLocationClass
string
The class the crash occurred in.
metadata object Element
Type
Description
count
long
Total number of crash types returned.
startTime
long
Beginning epoch timestamp in milliseconds used for the request.
endTime
long
Ending epoch timestamp in milliseconds used for the request.
maxSize
long
Maximum number of elements that can be returned.
sort
string
The order of the results sorted on a particular property.
GET mobile-crashes/:crash_fingerprint Purpose: Returns details about recent crash fingerprints.
Resource Resource URL:
https://mobile-data-api.newrelic.com/v1/mobile-crashes/{account_id}/{mobile_application_id}/{crash_fingerprint}
URL parameters:
Name
Default
Example
{crash_fingerprint}
Required: Crash fingerprint ID that specifies which crashes to retrieve. (Path parameter).
-
f2a7b92ee49279ebb4c379278234b2c0-1-60625
startTime
Optional: Epoch timestamp in ms. Defines the time window for data retrieval.
60 minutes ago
1479592610148
endTime
Optional: Epoch timestamp in ms. Defines the time window for data retrieval.
now
1480530548906
size
Optional: The number of crash occurrences to be returned. Valid range: 1 - 100
20
100
sort
Optional: The order of the results sorted on a particular property.
recent
recent
occurrencesWithStackTrace
Optional: Only return crashes that have their original stack trace.
false
true
Response occurrence object Element
Type
Description
id
string
A unique identifier for a unique occurrence.
timestamp
long
Epoch time the crash occurrence was recorded.
metadata object Element
Type
Description
count
long
Total number of crash types returned.
startTime
long
Beginning epoch timestamp in ms. used for the request.
endTime
long
Ending epoch timestamp in ms. used for the request.
maxSize
long
Maximum number of elements that can be returned.
sort
string
The order of the results sorted on a particular property.
GET crash-details/:occurrence_id Purpose: Returns details about a specific crash occurrence.
Tip Note : Time period matters! If you do not get any crash details for an occurrence, try expanding your start and end times.
Resource Resource URL:
https://mobile-data-api.newrelic.com/v1/crash-details/{account_id}/{application_id}/{occurrence_id}
URL parameters:
Name
Default
Example
{occurrence_id}
Required: The occurrence ID that specifies which crash occurrence to retrieve.
-
1936a6c0-68d1-40ec-b73d-24ed5905a36a
startTime
Optional: Epoch timestamp in ms. Defines the time window for data retrieval.
60 minutes ago
1479592610148
endTime
Optional: Epoch timestamp in ms. Defines the time window for data retrieval.
now
1480530548906
Response thread object Element
Type
Description
threadNumber
long
The number assigned to the thread.
threadName
string
The named assigned to the thread. May be null.
crashed
bool
Indicates the crashing thread. Only one thread will be crashing.
registers
Dictionary
Key/value pair of registers and their contents (strings and integers).
frames
Array<Frame>
An array of the individual frames of a thread.
frame object Element
Type
Description
library
string
The path of the library containing the instruction.
libraryAddress
hex
The start address of the library.
file
string
The filename containing the instruction. May be empty or null.
class
string
The class name containing the instruction. May be empty or null.
method
string
The method name containing the instruction. May be empty or null.
line
long
The line number of the instruction. May be 0.
instructionAddress
hex
The address of the instruction.
symbolAddress
hex
The address of the symbol containing the instruction. May be empty or null.
symbolName
string
The symbol string of the symbol address. May be empty or null.
GET thread-data/:crash_fingerprint Purpose: Returns symbolicated (iOS) or deobfuscated (Android) thread data for a given crash fingerprint.
Resource Resource URL:
https://mobile-data-api.newrelic.com/v1/thread-data/{account_id}/{mobile_application_id}/{crash_fingerprint}
URL parameters:
Name
Default
Example
{crash_fingerprint}
Required: Crash fingerprint ID that specifies which crashes to retrieve. (Path parameter).
-
f2a7b92ee49279ebb4c379278234b2c0-1-60625
Response thread object Element
Type
Description
threadNumber
long
The number assigned to the thread.
threadName
string
The named assigned to the thread. May be null.
crashed
bool
Indicates the crashing thread. Only one thread will be crashing.
registers
Dictionary
Key/value pair of registers and their contents (strings and integers).
frames
Array<Frame>
An array of the individual frames of a thread.
frame object Element
Type
Description
library
string
The path of the library containing the instruction.
libraryAddress
hex
The start address of the library.
file
string
The filename containing the instruction. May be empty or null.
class
string
The class name containing the instruction. May be empty or null.
method
string
The method name containing the instruction. May be empty or null.
line
long
The line number of the instruction. May be 0.
instructionAddress
hex
The address of the instruction.
symbolAddress
hex
The address of the symbol containing the instruction. May be empty or null.
symbolName
string
The symbol string of the symbol address. May be empty or null.
Response Codes Status Code
General Meaning
Description
400
Bad Request
Malformed or missing request parameters.
401
Unauthorized
Missing an API key or bad API key
403
Forbidden
API access not enabled
404
Not Found
Requested resource ID not found
406
Not Acceptable
Client requested an unsupported content type
422
Unprocessable Entity
Validation error
500
Internal Server Error
A server error has occurred
200
Success
Response returned