photools.com Community

IMatch Discussion Boards => IMatch Scripting and Apps => Topic started by: rebus on March 17, 2019, 07:33:07 PM

Title: Retrieving BuddyFiles from files endpoint?
Post by: rebus on March 17, 2019, 07:33:07 PM
The docs show how the buddy files for a given file can be retrieved using the variables endpoint:

http://127.0.0.1:50519/v1/variables?{auth}&​var={File.FullName}-{File.BuddyFiles}&​id=99

I'm wondering if the same information is exposed through the files endpoint? I'm already having to call that to get other data about the files, so if BuddyFiles are exposed I can save a server round-trip :)
Title: Re: Retrieving BuddyFiles from files endpoint?
Post by: Mario on March 17, 2019, 07:48:38 PM
Budy files may or may not be in the database. IMatch dynamically searches the file system whenever buddy files are required for processing.
This is a very expensive to calculate variable.

Have you considered using the /files/relations endpoint? It can deliver versions, buddies or both.
Title: Re: Retrieving BuddyFiles from files endpoint?
Post by: rebus on March 17, 2019, 09:03:31 PM
Thanks Mario! I'd missed that endpoint when searching the docs  :-[