Export category hierarchy to json

Started by ben, February 06, 2022, 01:11:46 PM

Previous topic - Next topic

ben

Hello everyone,

i am wondering if there is a possibility to export a category, including its hierarchy, to a json file?
Or is this something i do with an API endpoint?
For each file i only need basic information (filename, date, size), but what is important is to know the hierarchy name.

Thanks and have a nice weekend
Ben

Mario

#1
It's is not clear what you want to achieve.

Quotei am wondering if there is a possibility to export a category, including its hierarchy, to a json file?

Do you want to export the category name and children names?
The default export format for categories in IMatch is XML, which can be easily transformed into JSON (online converters).
Or you use the /v1/categories endpoint to pull the category names into your browser.

QuoteFor each file i only need basic information (filename, date, size), but what is important is to know the hierarchy name.

This sounds like you want to export information for files in a category to JSON?
This should be doable via the  Text Export feature. Have you tried that?

For example:

Name: {File.FullName}
Date: {File.DateTime}
Size: {File.Size}
Categories: {File.Categories}




produces JSON output like this:



Note that you can control the formatting of dates and numbers via the variable, you can limit the extracted categories etc.
See Variables for full details.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

Dear Mario,

Thanks for explaining the different options (many as always).
I will wrap my head around what is the best way to go.

I am basically extending the automation of my digital picture frame.
This should involve as few manual steps as possible (currently it's a one button thing).

So i assume i will go with the API endpoint approach.

Thanks again.
Ben