Mobile REST API examples
- Introduction
- Listing all supported mobile app monitoring metrics
- Listing supported mobile app monitoring tags
- Activity breakdown by platform
- Custom Geo IP mappings
Introduction
The Web REST API can be used to run queries against the collected data and to configure a new mobile app. For fundamentals about authentication, rate limiting, terminology, and conventions, see Web REST API.
This page provides web REST API examples related to mobile app monitoring, and guides about how to access to the same data by using Instana's user interface whenever possible.
Listing all supported mobile app monitoring metrics
Currently, the Instana user interface does not currently allow inspection of all possible metrics. But you can get all these metrics related to mobile app monitoring by using the web REST API call as follows:
curl -H "Authorization: apiToken $API_TOKEN" \
"https://$UNIT-$TENANT.instana.io/api/mobile-app-monitoring/catalog/metrics?pretty"
Activity breakdown by platform
User interface
The mobile app monitoring analyze view can provide the information about Activity breakdown by platform. To achieve this goal, group by mobileBeacon.platform
while optionally filtering for a specific mobile app that uses mobileBeacon.mobileApp.name
.
Next, configure the metrics that you are interested in. Within the screen capture that you selected, you can see the beacon count and beacon duration.
Web REST API
Here is an example Web REST API call to view the activity breakdown by mobile app platform:
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: apiToken $API_TOKEN" \
"https://$UNIT-$TENANT.instana.io/api/mobile-app-monitoring/analyze/beacon-groups?pretty" \
-d '
{
"type": "HTTP_REQUEST",
"group": {
"groupbytag": "mobileBeacon.platform"
},
"metrics": [
{
"metric": "beaconCount",
"aggregation": "SUM"
},
{
"metric": "beaconDuration",
"aggregation": "MEAN"
}
],
"pagination": {
"retrievalSize": 200
},
"order": {
"by": "beaconCount",
"direction": "DESC"
},
"tagFilters": [
{
"name": "mobileBeacon.mobileApp.name",
"value": "robotshop",
"operator": "equals"
}
],
"timeFrame": {
"windowSize": 3000000
}
}
'
Custom Geo IP mappings
Custom Geo IP mappings can be added by using the Web Rest API or the user interface. Refer to the Custom Geographic Details Configuration for examples.