ContributionsMost RecentMost LikesSolutionsRe: Need the API calls usage metrics per user Got the required data set. If any body is looking for the solution then please refer to below API call: /restapi/vc/users/login/[loginame]/metrics/name/restapi.call/history/daily?date_start=2024-02-01T00:01-05:00&date_end=2024-02-29T23:59-05:00&xslt=json.xsl Thanks Need the API calls usage metrics per user Hi Developers, I am looking for the restapi data set that can provide the V1 API calls usage metrics per user that is we can filter out on the basis of user id. I have referred to the documentation here: https://developer.khoros.com/khoroscommunitydevdocs/docs/api-1-metrics but was not able to find the class name and path name that can help us to get the metrics for a specific user. For example, I am looking for something like: /restapi/vc/metrics/name/restapi.call.user/id/[User ID]/count?date_start=2021-05-01T00:01-05:00&date_end=2021-05-31T23:59-05:00&xslt=json.xsl Any help will be much appreciated. Thanks in advance REST API Khoros Communities Bulk Data API SolvedRe: Get request origin in endpoints Hi VikasB Context object http.request.referrer can do the trick for you. Please refer to the documentation for the same here It will provide the the absolute URL of the origin and you can always use contains() method to check the index of the string you want to check. Let me know if this helps 🙂 Re: Problem creating pagination with rest2.0 query Hi wkennis The offset will have to be constructed dynamically. If you pass the hardcoded offset for every page then it will result in same result for every page. I have modified the code you have posted. Please find below: <#-- Gets page number from the URL and defaults to 1 --> <#assign page_number = webuisupport.path.parameters.name.get("page", 1) /> <#-- Gets the total number of results --> <#assign result_list_size = rest("2.0","/search?q=" + "SELECT count(*) FROM messages WHERE depth=0 AND board.id ='${coreNode.id}'"?url).data.count![] /> <#assign offset = (page_number - 1) * 10 /> <#-- gets all the recent messages--> <#assign messages = rest("2.0","/search?q=" + "SELECT id,subject,body,view_href,cover_image,author.login,author.id,author.view_href,kudos.sum(weight),metrics.views,post_time, post_time_friendly,search_snippet FROM messages WHERE depth=0 AND board.id ='${coreNode.id}' ORDER BY id LIMIT 10 OFFSET ${offset} "?url).data.items![] /> <#-- Your code--> <ul class="message-list"> <#list messages as message> <li class="message-item"> <h2 class="subject"><a href="${message.view_href}">${message.subject}</a></h2> </li> </#list> </ul> <#-- Pagination Component using the config we defined above --> <#assign pageableItem = webuisupport.paging.pageableItem.setCurrentPageNumber(page_number).setItemsPerPage(10).setTotalItems(result_list_size?number).setPagingMode("enumerated").build /> <@component id="common.widget.pager" pageableItem=pageableItem /> In the above code I have added offest programatically in the query. Also I changed the setPaginMode to enumerated to provide better UI exeprience. Kindly check the solution and let me know if this helps 🙂 Re: Default bio widget doen't work for plain Users and can't parse it from DB for plain Users Hi @igo The user biography is a permission driven setting which can be enabled or disabled by user from My Settings -> Preferences -> Privacy -> Show private information to URL: (/t5/user/myprofilepage/tab/user-preferences:privacy) Please see the attached screenshot for your reference. You need to set it to "All" in order to see it for non-admin users as well. If you need to show it in all conditions (non-admin users) consider using restadmin calls to fetch the user biography in your customization. Though it is not recommended to use excesive Restadmin calls as it effects the performance of the application and can cause security vulnerability. Thanks Re: Embedding styles into custom components - thoughts please PAULEM It is NOT recommended to add the custom CSS in the custom components. Though it will load the CSS only when component is loaded but it will deny you the privileges given by Khoros of optimizing your CSS and debug the synchronization issues in your CSS code which causes performance issue. Moreover by adding CSS code in components you are only increasing the rendering time of a component which is not optimizable also. You can find more about how the CSS is loaded in Khoros community here https://community.khoros.com/t5/Skins-and-assets/How-Khoros-handles-CSS/ta-p/109079 Also if you are using the version 19.5 or more then Khoros provides you the CSS performance enhancements in which they optimize your CSS to decrease the page Load time. You can find more about it in https://community.khoros.com/t5/Khoros-Communities-Release-Notes/Khoros-Communities-19-7-Release-Notes/ba-p/538709#performance Re: Unable to use the 'email' field in a WHERE clause when using LiQL against the users table Hi jeffshurtliff It seems that the where clause constraint you are trying to use is not available. However as an alternate you can use the v1 API call to fetch user from email. Please find below: [yourcommunityurl]/restapi/vc/search/users?q=email:[email id] Please let me know if this was helpful. Thanks Re: Get cover image using API V1? Hi ianb You can use the following alternative API call to get the cover image: [YourCommunityURL]/api/2.0/messages/[messageId]?fields=cover_image Cover image is called up explicitly. For more information please refer the following release notes documentation: https://community.khoros.com/t5/Developer-Discussion/Get-cover-image-using-API-V1/m-p/582015?utm_source=communitynotification&utm_medium=email&utm_campaign=immediate_general#M16845 Thanks Re: Error when viewing a endpoint Hi navya_0204 Can you please attach the code snippet you are using to fetch the response parameter for more details. Also please make sure you are passing the correct headers to salesforce API and that too base64 encoded. Thanks Re: SDK - Submit Plugin Hi Jake_N This looks like a problem in your SDK directory. Either one of your files/folder is missing or the file/folder name is wrong. Try uploading the plugin one by one i.e using plugin points pass the value one by one (component,endpoint,text). By this you will get to know which folder is causing the issue. Also if you have upgraded the community to 19.5 then you will have to contact lithium support as there is a bug in the update regarding the SDK and issue are faced with the same. Thanks