API only returns data from one application

Last updated:

If your API response doesn’t return the data you expect, the request might be defaulting to your subscription’s default application. This typically happens when your subscription has more than one application (web or mobile).

By default, Pendo API requests only return data from the default application in your subscription. This is always the original web application created when your subscription was provisioned.

  • If your subscription has only one web app, API requests will always return data from that app.
  • If you have multiple apps, or only a mobile app, the default behavior won’t include data from those other apps unless you explicitly modify the request. 

All examples below use the Pendo US instance (https://app.pendo.io). If your subscription is hosted in another region, use the appropriate base URL instead:

  • https://app.eu.pendo.io
  • https://us1.app.pendo.io
  • https://app.jpn.pendo.io
  • https://app.au.pendo.io

Request data from all applications

To include data from all apps in your subscription, modify your request depending on what type of data you are requesting.

For Pages, Features, and Guides

Add ?expand=* to the end of the URL:

https://app.pendo.io/api/v1/page?expand=*

https://app.pendo.io/api/v1/feature?expand=*

https://app.pendo.io/api/v1/guide?expand=*

For aggregation (event) data

Add "appId": "expandAppIds(\"*\")" to the event source in your request body. The following example is for the pageEvents source:

{
   "response": {
       "mimeType": "application/json"
   },
   "request": {
       "pipeline": [
           {
               "source": {
                   "pageEvents": {
                       "appId": "expandAppIds(\"*\")"
                   },
                   "timeSeries": {
                       "period": "dayRange",
                       "first": "now()",
                       "count": -1
                   }
               }
           }
       ]
   }
}

Request data from a specific application

To target a specific app, you must know its applicationId. In the examples below, 1111111111111111 is a placeholder for the applicationId.

For Pages, Features, and Guides

Add ?appId={{applicationId}} to the end of the URL:

https://app.pendo.io/api/v1/page?appId=1111111111111111

https://app.pendo.io/api/v1/feature?appId=1111111111111111

https://app.pendo.io/api/v1/guide?appId=1111111111111111

For aggregation (event) data

Add "appId": {{applicationId}} to the event source in your request body. The following example is for the pageEvents source:

{
   "response": {
       "mimeType": "application/json"
   },
   "request": {
       "pipeline": [
           {
               "source": {
                   "pageEvents": {
                       "appId": 1111111111111111
                   },
                   "timeSeries": {
                       "period": "dayRange",
                       "first": "now()",
                       "count": -1
                   }
               }
           }
       ]
   }
}

How to find your application ID

To find the applicationId:

  1. Go to Settings > Subscription settings in Pendo.
  2. From the Applications tab, select the app you want.
  3. Look at the URL in your browser: https://app.pendo.io/s/{{subscriptionId}}/admin/app/{{applicationId}}?tab=details
    • The applicationId is the long numeric string at the end.
    • The default application always uses -323232

Additional documentation

See the official Developer Documentation for more details on the Pendo API.

Was this article helpful?
0 out of 0 found this helpful