Forum Discussion

dhpawar's avatar
dhpawar
Helper
11 years ago

Call REST API for accepted solutions (Question & answer)

Hi,

is it possible to search across string for questions? I mean whether there is a method in the REST API that allows us to retrive a list of questions that are marked as solved and only matches with a given string.

For example searching and retrieving and xml containing all the solutions that contains the keyword 'feedback'.

Does anyone know about how to use the parameter in the REST API?

Thanks,

  • AdamN's avatar
    AdamN
    Khoros Oracle

    If you use the REST API message search call, you can filter by various criteria. To get only messages that are solutions (i.e. the reply to a question that has been marked as the solution), you can add the parameter "solution" and set the value to true.

     

    For example:

    http://lithosphere.lithium.com/restapi/vc/search/messages?q=feedback&solution=true

     

    If instead you wanted messages that have been solved (i.e. questions that have received a solution), you can use the parameter "solved" and set the value to true.

     

    For example:

    http://lithosphere.lithium.com/restapi/vc/search/messages?q=feedback&solved=true

     

    The first essentially gives you the "answers", and the latter essentially gives you the "questions".

     

    Does that answer your question, or were you looking for something different?

    • dhpawar's avatar
      dhpawar
      Helper

      I am looking to Rest call which searches for relevant posts /threads using the keyword.  also trying to filter the result such that i get back only threads  that has accepted soultions. is it possibale in singal Rest API Call?

       

       

      Thanks