Forum Discussion

wmertens's avatar
wmertens
Expert
12 years ago

How to use metadata with the REST API?

We're using endpoints to write metadata with calls like

'/restapi/vc/messages/id/xxx/metadata/key/foo.bar/set/?value=yyy'

and I'd love to search on those with calls like

'/restapi/vc/posts/for/metadata/key/foo.bar/value/true'

but I'm actually not getting any results with that call. If I try to retrieve the metadata value with

 

'/restapi/vc/posts/for/metadata/key/foo.bar/value/true'

then I just get a 303 permission denied error.

 

However, if you have custom tags enabled you can search for metadata with the key 'modbar.<customtag>' and it works.

 

So is there a permissions model for metadata? Can you set certain keys to be readable/writeable by users?

    • wmertens's avatar
      wmertens
      Expert

      Hi Scott,

       

      When I do /restapi/vc/posts/for/metadata/id/cisco.ispublishable/value/true I get error 502 invalid path element, and when I do /restapi/vc/posts/for/metadata/key/cisco.ispublishable/value/true I get 0 results. There is at least one message that has it set.

       

      When I use a number instead of cisco.ispublishable in that first call I get error 101 No metadata with the specified uid, I don't know what the id of that key is.