Forum Discussion
Hi wmertens,
I think you're already pretty close. Can you try this format of the API call?
restapi/vc/posts/for/metadata/id/id/value/value
Thanks,
Scott
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.
- ScottR13 years agoKhoros Alumni (Retired)
Hmm. Looks like your metadata field is there and with correct configuration. Looks like a bug. Can you file this one as a Case?
- YuriK13 years agoKhoros Alumni (Retired)Hey wmertens,
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