REST API: Landing page content not received

Highlighted

REST API: Landing page content not received

Hello,

I have encountered a strange problem while testing my application that uses Marketo REST API.

When I try to get a landing page by ID, everything works fine and the response contains all data: GET /rest/asset/v1/landingPage/{id}.json

However, when I call this request: GET /rest/asset/v1/landingPage/{id}/content.json, I always get this response:

{"success":true,"errors":[],"requestId":"2407#1614cdc6a5c","warnings":["No assets found for the given search criteria."]}

Any idea why is this happening or what it could mean? I am pretty sure the landing page has a content because I can see it when I click Edit Draft.

Filip

6 REPLIES 6
Highlighted
Level 10 - Community Moderator

Re: REST API: Landing page content not received

It's not about content as a whole, but named content sections. Does your page have content that is present at the LP level?

Highlighted

Re: REST API: Landing page content not received

Thanks for your quick response Sanford.

I am not sure because the landing page is not mine, it was created by a customer. How can I check if it has a named content? Sorry, I am quite new to Marketo and maybe I am just missing something obvious.

Filip

Highlighted

Re: REST API: Landing page content not received

I think I understand now. The page that does not return any content has only Template Elements in the draft view, but the other one that works has both Template Elements and Page Elements. So, the /rest/asset/v1/landingPage/{id}/content.json request works only with Page Elements, right?

Filip

Highlighted
Level 10 - Community Moderator

Re: REST API: Landing page content not received

That's right.

Highlighted

Re: REST API: Landing page content not received

OK, thanks again.

Filip

Highlighted
Level 10 - Community Moderator

Re: REST API: Landing page content not received

No prob, could you mark my first answer as Correct? Thanks.