Forum Discussion
MattV
4 years agoKhoros Staff
Run the
SELECT subject, view_href, occasion_data, images FROM messages WHERE board.id='instructurelive' AND occasion_data.status IN ('upcoming','ongoing') ORDER BY occasion_data.start_time asc LIMIT 1
query in the API browser in studio, and see what the data structure looks like. I don't have a good place to test at the moment, but if you're having issues with that, I'd guess that potentially the occasion status isn't in the exact structure you expect.
- Natkinson4 years agoGenius
That's the problem, it's not in the structure at all. So I'm wondering, is this something buggy in our instance or an oversight in either the API or the docs? Or maybe just something that's not included yet? Here's what I get back from that query:
{ "status" : "success", "message" : "", "http_code" : 200, "data" : { "type" : "messages", "list_item_type" : "message", "size" : 1, "items" : [ { "type" : "message", "view_href" : "/t5/test-event/Upcoming-Test-Event/ev-p/7648", "subject" : "Upcoming Test Event", "occasion_data" : { "type" : "occasion_data", "start_time" : "2021-07-15T07:00:00.000-07:00", "end_time" : "2021-07-15T08:00:00.000-07:00", "timezone" : "US/Mountain", "location" : "", "featured_guests" : { "type" : "users", "list_item_type" : "user", "size" : 0, "items" : [ ] }, "rsvp" : { "query" : "SELECT * FROM rsvps WHERE message.id = '7648'" }, "pending_invites" : { "query" : "SELECT * FROM occasion_invites WHERE message.id = '7648'" } }, "images" : { "query" : "SELECT * FROM images WHERE messages.id = '7648'" } } ] }, "metadata" : { } }
Related Content
- 11 years ago