Project

Profile

Help

Story #5788

Updated by chouseknecht over 4 years ago

Return a _content_match_ object similar to that found in v2 API search results. 

 As an example, if the user searches for "dynatrace" the keyword "dynatrace", the v2 API currently returns the following object for each item contained in _collections.results[]_: 

 <pre> 
 content_match": { 
     "total_count": 4, 
     "contents": { 
         "module": [ 
             "dynatrace_deployment", 
             "dynatrace_comment" 
             ], 
         "role": [ 
             "dynatrace_custom_deployment", 
             "dynatrace_problem_comment" 
             ], 
         "plugin": [] 
         } 
    } 
 </pre> 

 From the above, the UI knows that 2 modules and 2 roles matched.  

 Another thing we talked about fixing in Community Galaxy, and that we do not want to proliferate in AH,    is the lack of a total count being displayed in the UI for each content type. In other words, from the above, the UI knows that 2 modules matched. However, it does not know (or at least does not display) that the collection contains a total of 2 modules. What we want to see in the UI is something like, "Matching modules: 2/2".  

 If you look at the response object returned in the v2 API, you will find a _content_summary_ object. As part of this story, let's verify with the UI team that returning this object is sufficient or if something else is preferred. If something else, then add that. Otherwise, make sure _content_summary_ is returned.  

 Here's an example of the _content_summary_ object:  

 <pre> 
 "content_summary": { 
     "total_count": 4, 
     "contents": { 
         "module": [ 
             "dynatrace_deployment", 
             "dynatrace_comment" 
             ], 
         "role": [ 
             "dynatrace_custom_deployment", 
             "dynatrace_problem_comment" 
             ], 
         "plugin": [] 
         } 
 }, 
 </pre>

Back