IMWS.post('V1/metadata',postData)

Started by philippe28, August 09, 2017, 09:57:36 PM

Previous topic - Next topic

philippe28

Playing around metadata (Master -> Version), I can set the tags I need so far (thanks to the numerous examples provided by Mario), except XMP::xmpRights\Marked for which I've not found a shortcode.
Is there a way to read/write this tag ?

Just a remark: I've also noticed that for gps data, altitude doesn't behave as latitude and longitude. The last two ones require the parameter rawvalue: true as indicated in Code Recipes but not the first one.
Edit2: If the source latitude is not defined it is read as 0. Is there a way to detect this situation ? What should be the value to enter to set it as not defined (Null doesn't work) ?

Thanks
Philippe

thrinn

Hello Philippe,
try

IMWS.post("v1/metadata", {
  tasks: JSON.stringify([
    {
      "id": 6,
      "tag": "XMP::xmpRights\\Marked\\Marked\\0",
      "op": "set",
      "value": true
    }
  ])
})

This works for me.
I used the Vartoy app to find the correct tag name. You do not have to use a shortcode, it only makes life easier a bit. But if there is none, the tag itself works also. Just remember to double the backslashes...
Thorsten
Win 10 / 64, IMatch 2018, IMA

philippe28

Hi Thorsten,
that works fine ! Both for reading and writing.
Thank you for the tips !
Philippe