Re: REST API to move assets? Move Email Program frrom Folder A to Folder B

Frank_Fu
Level 2

REST API to move assets? Move Email Program frrom Folder A to Folder B

I would like to use the Marketo REST API to move an Email Program from Folder A to Folder B. 

 

We programmatically generate 2-3 Email programs each day, so at the end of the month we would like to move it into another folder then have it archived.  Right now, I'm doing this manually by clicking on each of my Email Programs and using my mouse to drag it to my destination folder and this becomes tedious very very quickly. 

 

I've taken a look at the Programs Endpoint Reference but I couldn't find how to "Move" it from Folder A to B.

 

Here I'm trying to pass in 3 different parameters (description, name and folder) . 

description and name work but folder  does not.

Frank_Fu_0-1589356737103.png

 

 

 

Any ideas?

 

Thanks

Frank

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: REST API to move assets? Move Email Program frrom Folder A to Folder B

Y'know, I don't think this can be done. 🤔  

 

It seems like a good way to mangle an instance, since most people don't keep an offline mirror of their MA tree (not a solid excuse for it not to exist, just a comment). But maybe we haven't found the right undocumented payload...

Frank_Fu
Level 2

Re: REST API to move assets? Move Email Program frrom Folder A to Folder B

Actually, buried in the API docs is a sentence which reads

 

"..Only description, name, tags and costs may be updated after creation, with an additional costsDestructiveUpdate parameter allowed..."

 

So I may just be out of luck. 

 

Anyhoot, I guess I'll have it tackle it from a different angle. I think I'll have another cronjob that to pre-create these folders based on {year}-{month} pattern in advanced using the folder create endpoint,  so that my normal cronjob can call the query folder by name endpoint and grab the target folder IDs that way. After that, once a month, I'll have another cronjob to then query the folders I need to archive and using the folder update metadata endpoint by passing in the optional isArchive parameter to archive them. It's a bit more work but hopefully this would work.