Search code examples
restapibulkoperationmarketo

Marketo landing page bulk operation through REST API


I don't have any knowledge on APIs and wanted to approve 200+ marketo landing pages which are in draft to approved. There is an REST API given by marketo on developer site but it contains landing page ID and can update one at a time. I tried to explore the possibility to pass multiple ID there but didn't succeed.

Any help or advise would be helpful. Below is the API call provided/suggested in Marketo developers site and need help in customizing to pass multiple ID's here

http://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Landing_Pages/approveLandingPageUsingPOST

Best, Vinu


Solution

  • In this case, you would want to first query the landing pages you're looking for with /rest/asset/v1/landingPages.json (presumably querying for pages with a status of draft and/or are in a certain folder), then store those IDs in an array/object/whatever. Loop through that collection with calls out to /rest/asset/v1/landingPage/{id}/approveDraft.json to approve all pages.