Mobile REST API examples
The Instana REST API examples that are related to mobile app monitoring, and guides about how to access to the same data by using Instana's user interface whenever possible.
Introduction
The Instana 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 Instana REST API.
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 Instana REST API call as follows:
curl -H "Authorization: apiToken $API_TOKEN" \
"https://$UNIT-$TENANT.instana.io/api/mobile-app-monitoring/catalog/metrics?pretty"
Listing supported mobile app monitoring tags
User interface
You can see the available grouping and filtering tags for each beacon type within the mobile app monitoring analysis area by clicking Add filter or Add group.
Instana REST API
The following example Instana REST API calls to view the available grouping tags for sessionStart beacon type:
curl -H "Authorization: apiToken $API_TOKEN" \
"https://$UNIT-$TENANT.instana.io/api/mobile-app-monitoring/catalog?beaconType=sessionStart&useCase=GROUPING&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.
Instana REST API
The following example Instana 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 Instana Rest API or the user interface. See Custom Geographic Details Configuration for examples.