AnsweredAssumed Answered

How to get Folder Archival status of the default workspace using python?

Question asked by Viki Sparks on Jun 17, 2019
Latest reply on Jun 26, 2019 by Viki Sparks



I'm trying to replicate the whole Marketo instance in a spreadsheet, where I can analyze/audit the all campaigns.

I;m trying to achieve this with REST API and Python

I would like to know the list of, 

  • Active/Inactive Programs
  • Active/Inactive Smart Campaigns
  • Active/Archived Folders
  • Program/Folder Token Values

Right now, I'm looking from programs in a active folder and the programs in the Archived folders. Using the REST api "Browse Folder" method.

Below is the Python code I used, 

from marketorestpython.client import MarketoClient



munchkin_id =
client_id =
client_secret =
mc = MarketoClient(munchkin_id, client_id, client_secret)

lead = mc.execute(method='browse_folders', root=3, maxDepth=9, maxReturn=200, workSpace='Default')


For some reason, I get the output which is not JSON but something like you see below,

[{'name': 'Marketing Activities', 'description': 'Root node for the Marketing Activities app area', 'createdAt': '2013-06-02T00:21:24Z+0000', 'updatedAt': '2013-06-02T00:21:24Z+0000', 'url': None, 'folderId': {'id': 3, 'type': 'Folder'}, 'folderType': 'Zone', 'parent': None, 'path': '/Marketing Activities', 'isArchive': False, 'isSystem': True, 'accessZoneId': 1, 'workspace': 'Default', 'id': 3}

And with the maxDepth=9, the result is incomplete, not all folders data comes in the output. It's stops randomly.


Anyone knows how to convert the output to JSON and get the complete data with maxDepth=9?


Thanks in advance.