IMWS.post('v1/categories/assign': Can I assign more than one category at once?

Started by ubacher, June 28, 2017, 09:50:40 PM

Previous topic - Next topic

ubacher

Assigning a category: Can I assign more than one category in one call?

IMWS.post('v1/categories/assign', {
            path: 'WHO|Mary', // how (if possible) can I put more than one category?
            fileid: thatfile.id
        }).then(function (response) {......

Mario

Only one path allowed. Multiple category ids allowed, and of course if you use an idlist, it can also have any number of categories.

No real speed gain, but you can lookup the ids by path outside the loop and then just use the ids instead of doing multiple iterations for each path.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook