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.
Solved! Go to Solution.
...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.
@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
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
}
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.
...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.
@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