Question: Where do I find the documentation for "actions"?

Started by thrinn, June 30, 2017, 05:46:42 PM

Previous topic - Next topic

thrinn

The Web Services documentation for the v1/attributes endpoint mentions:
Quoteactions: A JSON object which specifies which files to update and which Attributes to set. See separate documentation for details.

Where can I find this documentation for actions? I first thought actions would be a synonym for the Tasks object which is describes in detail on the Code Recipes page. But the Attributes Sample App uses op: "update" which is not documented for the Tasks object, so this seems to be something different.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

attributes is wrong, have renamed it to tasks later. I will fix the schema parameter.

I think there is no documentation for POST /attributes yet, don't remember. If so, add a feature request. Allowed ops are add/update/delete/replace.
I thought the sample app was sufficient.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

Sorry, I am a bit confused:
Do you mean v1/attributes POST expects a parameter called tasks instead of actions? Or is it something you will change for an upcoming release?

I ask because the Attributes Sample App (2017.6.10) uses actions and works well:

// Convert data into a string to send it to IMWS
params.actions = JSON.stringify(actions);


Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

It expects tasks. See the Attributes sample app for details.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

Hm, the code sample in my last post is from the sample app (code lines 381, 455, 527). String "task" can not be found in the entire index.html.
Maybe you already changed it in your development system after the last update?
Thorsten
Win 10 / 64, IMatch 2018, IMA

ubacher

I just posted an app which reads and writes an (image level) attribute.
Maybe the code will help you. I started with Mario's sample app (cut and paste programming).

thrinn

Thank you, ubacher. I think you are becoming the App Master of this community  ;)
Thorsten
Win 10 / 64, IMatch 2018, IMA

sinus

Quote from: thrinn on June 30, 2017, 09:42:15 PM
Thank you, ubacher. I think you are becoming the App Master of this community  ;)

:D

both of you  8)
Best wishes from Switzerland! :-)
Markus

Mario

My guess was wrong. It's called actions not tasks for attributes. Sorry for the confusion. I should have named that tasks to make it more similar to metadata updates, but there you go. Hard to get everything right with an API so huge.

I could rename it to tasks for the next update but I don't know how many apps this will break.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

Well, I think as you already enhanced the documentation with actions it would be easier to leave it at it is. In the end, it is not a big deal.
Thorsten
Win 10 / 64, IMatch 2018, IMA