SOLVED

Re: Marketo Asset API

Go to solution
harshadoak
Level 1

Marketo Asset API

I want to fetch latest updated images using Marketo API. Can somebody please help me on this issue. I am not able to find any such filter in Marketo API documentation.

Tags (1)
2 ACCEPTED SOLUTIONS

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Asset API


...I need to fetch only those images which are created on/after specific date or latest created etc.

AFAIK this is not possible.

 

One would hope you don’t have so many images that fetching the whole tree each time is a burden, although it’s understandably frustrating to not have the option.

View solution in original post

Jo_Pitts1
Level 10 - Community Advisor

Re: Marketo Asset API

@harshadoak,

@SanfordWhiteman is correct, there is no way to filter by date range, so you'd have to retrieve them all and then filter the list client side.  

 

As a point of slight pedantry, you're not actually fetching the files, just a reference to them (through the URL attribute), if you want to get the actual file content, you'd need to then pull them down.

 

Cheers

Jo

View solution in original post

4 REPLIES 4
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Marketo Asset API

You can refer to the query all files endpoint. If you query all the files, you can look at the updatedAt parameter to find the files that were recently updated. For each file, it returns the following details about it:

{
createdAt (string): Datetime when the file was created ,
description (string, optional): Description of the file ,
folder (FileFolder): JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program' ,
id (integer): Id of the file ,
mimeType (string): MIME type of the file ,
name (string): Name of the file ,
size (integer): Size of the file in bytes ,
updatedAt (string): Datetime when the file was most recently updated ,
url (string): Publically accessible URL of the file
}
harshadoak
Level 1

Re: Marketo Asset API

Hi Darshil - Thanks for your response however, I am trying one more step ahead. The /rest/asset/v1/files.json API fetches all the files/images from design studio. However I am working on the POC where I need to fetch only those images which are created on/after specific date or latest created etc.

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Asset API


...I need to fetch only those images which are created on/after specific date or latest created etc.

AFAIK this is not possible.

 

One would hope you don’t have so many images that fetching the whole tree each time is a burden, although it’s understandably frustrating to not have the option.

Jo_Pitts1
Level 10 - Community Advisor

Re: Marketo Asset API

@harshadoak,

@SanfordWhiteman is correct, there is no way to filter by date range, so you'd have to retrieve them all and then filter the list client side.  

 

As a point of slight pedantry, you're not actually fetching the files, just a reference to them (through the URL attribute), if you want to get the actual file content, you'd need to then pull them down.

 

Cheers

Jo