anon50124953 | 2019-08-26 11:52:32 UTC | #1
How do I get the details of the last 10 interactions for a user? I've tried a few different routes (and looked at the post in 2017 saying how to do it) but whenever I try to filter by the user I get a response that it's not implemented:
{
"readyState": 4,
"responseText": "{\"status\":400,\"code\":\"bad.request\",\"message\":\"Dimension participantId is not yet supported. Allowed dimensions include [organizationId, mediaStatsMinConversationMos, mediaStatsMinConversationRFactor, conversationId, conversationEnd, originatingDirection, divisionId]\",\"messageParams\":{},\"contextId\":\"ebe53083-d29f-4a45-8a2a-cafc4a12f523\",\"details\":[],\"errors\":[]}",
"responseJSON": {
"status": 400,
"code": "bad.request",
"message": "Dimension participantId is not yet supported. Allowed dimensions include [organizationId, mediaStatsMinConversationMos, mediaStatsMinConversationRFactor, conversationId, conversationEnd, originatingDirection, divisionId]",
"messageParams": {},
"contextId": "ebe53083-d29f-4a45-8a2a-cafc4a12f523",
"details": [],
"errors": []
},
"status": 400,
"statusText": "Bad Request"
}
anon28066628 | 2019-08-27 15:47:28 UTC | #2
Did you try a segment filter for userId?
anon50124953 | 2019-08-27 15:55:06 UTC | #3
Thanks. That worked. Is there a way to query past the last 30 days?
anon28066628 | 2019-08-27 16:23:05 UTC | #4
With a filter, you can query up to 31 (or 32?) days. The interval is your choice - if you want the last 90 days, for example, you'd need 3 intervals and 3 queries.
Note with no query filter, the interval limit is 7 days.
tim.smith | 2019-08-27 19:27:39 UTC | #5
Please keep in mind that Analytics best practices recommend that queries should be optimized so you don't page deeper than around 10 pages. If you do a query over 30 days, you'll have to page way deeper than is feasible (query efficiency diminishes as you go deeper). At some point, requests will begin timing out because they aren't able to complete in the maximum allotted amount of time for a response to be generated. Optimizing this query will take the form of shortening the interval and/or applying filters to limit the result set.
system | 2019-09-27 19:27:42 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 5873