Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2021-03-04 00:33:01

jtsai@osa.org
Member
Registered: 2021-01-08
Posts: 2

Files.UpdateMetadata

Hi,
I need some help with this call. Can you provide with an sample what this request should look like? The documentation states the tagIds field is a list of GUIDs.
A9F7gDO.png
But when I use MetadataCatalogue.GetAllFields to pull back metadata fields, some of the fields don't have a GUID.
2CR0SQq.png
I picked one with GUID available but the response indicated the field doesn't exist.
TfDSOrV.png
I tried using "id" instead of "guid" but it returned API error.
5yxAlyf.png

Any help is appreciated.

Thanks,

John

Offline

#2 2021-03-11 17:27:32

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: Files.UpdateMetadata

Hi John,

The metadata parameter is a map of tag to an array of values, for example:

{"labels": ["test"]}

The other thing here is that the documentation is missing a key point: the key into `metadata` should be the same as that used to look up the field, and it can be supplied as either the numeric ID or the tag name.

So a full query would look like:

{"assetId": 64596065520,"tagId":"labels","metadata":{"labels":["token"]}}

or

{"assetId": 64596065520,"tagId":34,"metadata":{34:["token"]}}

Dominic

Offline

Board footer