Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2022-10-03 11:25:55

alfie
Member
Registered: 2022-08-30
Posts: 4

Fetch New images

Hello,

I am trying to use the API to fetch a list of images that have been updated in the last 24 hours. The way our system works is that images may be uploaded at some point, then at a later date they will have a code added to the keywords field. At that point they need to be added to our site. Essentially this means I need to be able to use the API to fetch all images that have been updated in a specific time period.

I couldn't see anything in the documentation that would allow me to do this directly. One solution I thought of was to create a "smart collection" that was set to contain images that have recently had their data updated, then I can use the endpoint "https://howarthtimber.chorus.thirdlight.com/rest/v1/content/[collection id]" to fetch everything in this collection. Unfortunately while smart collections will let you use th upload date as a parameter, you can't seem to do the same with the updated date.

Is there another solution I can use to achieve this?

Thanks

Offline

#2 2022-10-03 16:35:01

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: Fetch New images

Hi,

You can use 'Last Changed' in this manner - to be usable in a search (or Smart Collection), it needs to be added to a visible metadata panel.

Dominic

Offline

#3 2022-10-05 10:27:08

alfie
Member
Registered: 2022-08-30
Posts: 4

Re: Fetch New images

Hi, thanks for your response. Sorry I am not sure what you mean by adding it to a "visable metadata panal". When I look at adding a new condition to the smart collection I cannot see a "last changed" option. Is there something I am missing?

Offline

#4 2022-10-07 14:05:50

alfie
Member
Registered: 2022-08-30
Posts: 4

Re: Fetch New images

Hi, "Last Changed" is visible as a parameter if you click on an image, but it is still not an option for advanced seach or for a smart collection definition. Do you know why this might be? Thanks

Offline

#5 2022-10-10 14:45:46

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: Fetch New images

Hi,

The first tab (labelled "Info") always shows upload date and last changed date - but for them to be searchable they have to be shown on the Metadata tab (the second one), which is based on the metadata panels that are in scope. The UI for searching or creating a Smart Collection shows available metadata fields grouped by the name of the panel, plus some inbuilt ones at the bottom.

https://www.thirdlight.com/docs/display … of+a+space describes the process of managing metadata panels.

Dominic

Offline

#6 2022-10-10 15:26:52

steve
Third Light Staff
Registered: 2013-06-06
Posts: 105

Re: Fetch New images

Hi Alfie,

We have made a small change on our side and you should now be able to see the 'Last Changed' option offered through Advanced Search or when creating a Smart Collection.

Best Regards,
Steve

Offline

#7 2022-11-03 16:29:16

alfie
Member
Registered: 2022-08-30
Posts: 4

Re: Fetch New images

Thanks Steve.

This almost works for this usage except that the contents of the smart collection appear to not update until the parameters are changed in some way. For example when setting the smart collection to contain images updated in the last two days, it will change the contents to match these parameters. But then as time goes on the contents will remain exactly the same, until I go to the edit page and change the conditions.
I need it to contain the images changed recently at the time when the collection was first defined, and then have these contents change as new images are updated etc.
I realise this may not be how smart collections were designed to be used, so alternatively is there a way to run an advanced search using the rest API, so I can just search for these images instead? The swagger seems to only have a definition for a regular search.

Kind regards,

-Alfie

Last edited by alfie (2022-11-03 16:29:52)

Offline

Board footer