Skip to main content
Level 1
Jan 29, 2025 2:31 AM UTC
Question

Marketo REST API returns Empty result

I have been trying to access user activity using the Marketo API. But when I enable the filter for my form using the assetIds property, I get an empty result, even though the moreResult parameter is true. 
I have tried sending subsequent requests using the nextPageToken from the response using a script 40+ times. Still I don't get any results even though i can see there are activities for that form via the Marketo UI.

{
    "requestId": "cff5#194afe31292",
    "success": true,
    "nextPageToken": "V54QFQASDKUGS7WTQJFWFEQV3LEYG5A4FQ4BZGTUE7ZDQMS3U5MA====",
    "moreResult": true
}
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
User Group Leader
User Group Leader
Jan 29, 2025 2:56 AM UTC

You have to poll until moreResult is false, 40 pages may not be enough because you're cursoring through lots of other activities.

Translate
Darshil_Shah1
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Jan 30, 2025 5:22 AM UTC

@subigya, I think you'd also need to set the "activityTypeIds" (and mention the activity type ID corresponding to the "Fill out Form" activity). You can get your instance's activity types and IDs using the GET Activity Types API endpoint. The documentation says the "assetIds" parameter should only be used when a single activity type is set.

Translate