Forum Discussion

skatiyar's avatar
skatiyar
Expert
3 years ago

List if Events that user has attended and future event rspv'ed for

Hi Friends,

 

Is there an API to get the following for events. 

1. Get list of past events that user attended (RSVP value yes)

1. Get list of future events that user is going to attend (RSVP value yes or maybe)

I could not find the API or query for this. Appreciate the help.

 

Cheers,
Sachin

 

 

 

 

  • RogerW's avatar
    RogerW
    Khoros Alumni (Retired)

    Hello Sachin,

    Unfortunately I don't believe there is a way to do this in a single request.

    To get the RSVP status, you can obtain it with the use of this: https://developer.khoros.com/khoroscommunitydevdocs/reference/get-rsvp

    https://community-domain/api/2.0/messages//rsvps/

    That requires both the user id and message id in order to obtain the status of the RSVP so you prior to performing the above you would need those before you can run this.

    Hopefully that can get you started .

    Thank you,

    Roger

  • Hi Roger,

     

    Thanks for the response but that does not help in our existing use case since we are looking to show the data on user profile just like user recent activities and there is no way to know and pass all messages ids where user has activity. Is there a road map for such an API already? 

     

    Thanks.
    Sachin 

  • RogerW's avatar
    RogerW
    Khoros Alumni (Retired)

    Hello Sachin,

    Unfortunately, RSVPs are tied to messages for querying as is noted here at the very top  of the page:  https://developer.khoros.com/khoroscommunitydevdocs/docs/rsvps

    Trying to just query for a list of all the rsvp details in LiQL you get an error stating a message id is required.  I tried to see if this might work as well:  select * from rsvps where user.id = <ID> but I got an error indicating the message id is required.

    I see how in your use case, this would be a lot of "churning" through data to get the message id to query.  It could be reduced by searching over a range of time for the message ids, but I don't know if that would be an option for you or not.  

    To answer your question, unfortunately it doesn't seem like there is a direct way of getting what you are looking for.  The information is present, but would require some churning involving multiple queries to parse through it.

    Thank you,


    Roger  

  • Thanks Roger, Sounds like I should create an idea for this API feature. Thanks