Forum Discussion
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.
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
- wmertens13 years agoExpert
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.