Forum Discussion

drubalcaba_cks's avatar
drubalcaba_cks
Contributor
9 years ago

Custom Tags API doesn't return value for List types

Hi, I'm running into a slight problem with the API's available to get Custom Tags data.

 

My circumstance is that I am trying to pull any custom tags associated with a specific message. The best way I have found is to make a query like the following:

 

SELECT * FROM custom_tags WHERE messages.id='12977'

Which will return something like this:

 

{
"type" : "custom_tag",
"id" : "1033",
"href" : "/custom_tags/1033",
"text" : "ListTagName",
"messages" : {
"query" : "SELECT * FROM messages WHERE custom_tag.id = '1033'"
}

 

This works fine for 'Flag' type custom tags, as the name of the custom tag (value of "text") is all I need. However for 'List' type custom tags, it does not return the value of that flag. It just alerts me that "ListTagName" has been set on the message, but not what it has been set to. It would be of great help if the value was also returned in this call. As far as I can tell the href("/custom_tags/[id]") is about the custom tag globally, not about it's attachment to this specific message.

 

 

 

 

 

  • ChhamaJ's avatar
    ChhamaJ
    Khoros Staff

    Hi There,

     

    I definitely understand the need for returning that value in the API response but unfortunately we do not. I have filed a ticket to resolve this (but again no promises on the timeline since the ticket still needs to be prioritiized and fixed).

    But you may be able to do something similar in API v1 like below

    http://communitycom/restapi/vc/messages/id/74/metadata/key/modbar.ctlistone

    Note that all the keys get appended with a modbar prefix.

     

    Hope this helps.

     

    Regards,
    Chhama

    • cblown's avatar
      cblown
      Boss

      Old thread revival Batman!

       

      We've been testing the V2 API and it works with Custom Attribute tags 


      SELECT * FROM messages WHERE custom_tags.text = 'modbar.testb'

       

      However, it doesn't work with Custom List tags? 

       

      Hi ChhamaJ - can you please let us know what's the latest on this ticket internally?