Solved

How to tell if a response has multiple pages

  • 1 February 2024
  • 2 replies
  • 57 views

Badge

Hi!  I’m new to amplitude so please bear with me while I assimilate to the lingo :)

 

I’m trying to do an API call to a chart that I have already created.  This is the following GET URL I am using:

https://amplitude.com/api/3/chart/xxxxxx/query

 

In the response, I don’t see an attribute telling me how many pages I have.  This is what I see at the bottom of the response.  Can someone help me with this?  In Amplitude, I have 1200 results but in the API, it’s capped at 1000

 

"timeComputed": 1706812263267,
"wasCached": true,
"cacheFreshness": "FRESH",
"novaRuntime": 47,
"novaRequestDuration": 79,
"novaCost": 0,
"throttleTime": 0,
"minSampleRate": 1.0,
"transformationIds": [],
"backend": "novaV2",
"realtimeDataMissing": false,
"timedOutRealtimeData": false,
"missedCacheAndNotComputed": false,
"partialMergedAndNewUserInformation": false,
"prunedResult": true,
"hitChunkGroupByLimit": false,
"subcluster": 9,
"millisSinceComputed": 2440356,
"earliestServerReceivedTime": 9223372036854775807,
"queryIds": [
"xxxxxx"
],
"novaRequestStartAndEndTimes": [
[
1706814703525,
1706814703604
]
],
"perQueryMetadata": [
{
"queryId": "xxxxxx",
"queryType": "MULTI_SEGMENTATION",
"cached": true,
"cacheFreshness": "FRESH",
"throttleTime": 0,
"novaCost": 0,
"minSampleRate": 1,
"realtimeDataMissing": false,
"externalDataMissing": false,
"timedOutRealtime": false,
"missedCacheAndNotComputed": false,
"prunedResult": true,
"hitChunkGroupByLimit": false
}
],
"prunedAmpIds": [],
"dashRequestDuration": 481.92405700683594,
"dashRuntime": 402.92405700683594

 

icon

Best answer by Saish Redkar 6 February 2024, 00:23

View original

2 replies

Userlevel 7
Badge +10

Hi @Mattics Phi 

Here’s a post which can help you navigate pruned results via Dashboard REST API

https://community.amplitude.com/building%2Dand%2Dsharing%2Dyour%2Danalysis%2D58/how%2Dto%2Dget%2Dfull%2Dchart%2Dresult%2Dwithout%2Dpruning%2Din%2Drest%2Dapi%2D1021?postid=3475#post3475

Hope this helps.

Badge

Hi @Saish Redkar !  IThanks for the help!  I was able to produce a response with this HTTP

 

https://amplitude.com/api/2/events/segmentation?e={"event_type":"caller_info_popup_triggered"}&start=20240101&end=20240131

 

but I was unable to actually get the events for the time period.  In the response, I just got the days that events happened.  How would I go about getting all of the events that are returned in the web?  ChartID got me to this, but it was limited to only 1000

{
"data": {
"series": [
[
138,
1564,
1756,
1770,
1711,
330,
147,
1851,
1895,
1957,
1888,
1809,
314,
148,
1544,
1886,
1986,
2006,
1872,
333,
145,
1895,
1970,
1979,
1939,
1801,
313,
170,
1928,
1985,
2030
]
],
"seriesCollapsed": [
[
{
"setId": "",
"value": 3950
}
]
],
"seriesLabels": [
0
],
"xValues": [
"2024-01-01",
"2024-01-02",
"2024-01-03",
"2024-01-04",
"2024-01-05",
"2024-01-06",
"2024-01-07",
"2024-01-08",
"2024-01-09",
"2024-01-10",
"2024-01-11",
"2024-01-12",
"2024-01-13",
"2024-01-14",
"2024-01-15",
"2024-01-16",
"2024-01-17",
"2024-01-18",
"2024-01-19",
"2024-01-20",
"2024-01-21",
"2024-01-22",
"2024-01-23",
"2024-01-24",
"2024-01-25",
"2024-01-26",
"2024-01-27",
"2024-01-28",
"2024-01-29",
"2024-01-30",
"2024-01-31"
]
},
"timeComputed": 1707344797344,
"wasCached": false,
"cacheFreshness": "FRESH",
"novaRuntime": 759,
"novaRequestDuration": 782,
"novaCost": 1000,
"throttleTime": 3,
"minSampleRate": 1.0,
"transformationIds": [],
"backend": "novaV2",
"realtimeDataMissing": false,
"timedOutRealtimeData": false,
"missedCacheAndNotComputed": false,
"partialMergedAndNewUserInformation": false,
"prunedResult": false,
"hitChunkGroupByLimit": false,
"subcluster": 9,
"millisSinceComputed": 2,
"earliestServerReceivedTime": 9223372036854775807,
"queryIds": [
"ZPLJP3Wf7V"
],
"novaRequestStartAndEndTimes": [
[
1707344796563,
1707344797345
]
],
"perQueryMetadata": [
{
"queryId": "ZPLJP3Wf7V",
"queryType": "MULTI_SEGMENTATION",
"cached": false,
"cacheFreshness": "FRESH",
"throttleTime": 3,
"novaCost": 1000,
"minSampleRate": 1,
"realtimeDataMissing": false,
"externalDataMissing": false,
"timedOutRealtime": false,
"missedCacheAndNotComputed": false,
"prunedResult": false,
"hitChunkGroupByLimit": false
}
],
"prunedAmpIds": []
}

 

Reply