Forum Discussion
What is the data type that is set up for your metadata? We currently don't support lookup by freeform_string metadata. If you're just doing true or false I would use the exists API to get all messages which have the cisco.ispublishable metadata applied to it and not apply metadata where you want false. http://lithosphere.lithium.com/t5/rest-api/bd-p/developers-rest-api?leaf-id=Community.posts#Community.posts.for.metadata.key.key.exists
Hope this helps,
Yuri
No, the /exists call returns false.
PS: Hey I didn't see those API docs before, cool :)
- YuriK13 years agoKhoros Alumni (Retired)
Whoops, my apologies, that API is supposed to show you whether any messages have that metadata assigned. Are you sure you're spelling the metadata name correctly? I wonder if capitalization matters here.
YuriP.S. Glad you like the new docs
- YuriK13 years agoKhoros Alumni (Retired)
Hey wmertens,
The issue here is that you have both a metadata item named cisco.ispublishable and a custom tag named cisco.ispublishable. When creating a message it looks like the custom tag is applied. In order to lookup using the custom tag, you need to prepend "modbar" to the key as outlined here:
So the call should be restapi/vc/posts/for/metadata/key/modbar.cisco.ispublishable/value/true
Also thanks to KrisS for helping out with this.
Hope this helps,
Yuri
- wmertens13 years agoExpertActually, we don't have custom tags enabled in prod, where we have the same issue.
- BradR12 years agoKhoros Alumni (Retired)
I'm running into the same issue here and wondering if there is any insight to be had. I have defined a metadata element as canonicalized_string.
I have that metadata set on a specific post, and can verify it:
/restapi/vc/messages/id/154625/metadata/key/lithiumcse.metabrad
But when I use the existence method as follows:
/restapi/vc/posts/for/metadata/key/lithiumcse.metabrad/exists
returns false.
Any thoughts?