Forum Discussion

Inactive User's avatar
Inactive User
5 years ago

Where is the actual URL in a V1 response?

I get returned the href for another API call .... I'm looking for a url I can use to link. What I get in all areas of the message object are values like:

 

  • href: "/threads/id/9168"
  • Canonical url is null

In V2 I can get the actual URL. How to do that in V1? I need to use V1 because I'm calling the API from outside Freemarker.

  • MattV's avatar
    MattV
    Khoros Staff

    You need to add ?restapi.response_style=view parameter, and then you will get a view_href property returned for the thread.

  • Hi Inactive User 

    You cant have API V2 outside the community in URL Like this: "https://community-link/api/2.0/search?q=V2 API"

    Example:

    https://community.khoros.com/api/2.0/search?q=select%20*%20from%20messages 

     

    Where "q" is the query parameter that has the value of  V2 API that you pass in API.

    As in the above example, you have " select * from messages" value for parameter "q"

    Let me know if this works for you.

    Please Give Kudos if you find this post useful and mark this as Accepted Solution if this is the required solution.