ContributionsMost RecentMost LikesSolutionsRe: Creating endpoints for LSI Hi, I think the Bulk Data API will be the best suggestionfor this purpose. As we don't have access to this feature yet with our community, now we will have to wait until we are granted to it. I am sure then we will get the right data. So thanks again for sharing your ideas! Regards, Marionne KPNOnline Re: Creating endpoints for LSI OlivierS. I meant LSI, because this is where I know I can find the right information. But if I can get the visitors count and top search terms somehow by using LSW, thats fine by me as well. Or just an easy v1 or v2 call would be even easier (but as far as I found thats not possible). Thank you for responding. Regards, KPNOnline Creating endpoints for LSI Hi all, In order to create a simplified external dashboard for our community, I am looking for a way to create endpoints for LSI. For example: I need informationlike amount of unique visitors yesterday or top 10 search terms. It would be best to get the output as a json. Do I need anAnalytics API User account for this? Or what is the best way to get this information? I succeeded creating endpoints by usingapi v1 and v2 calls already for othertypes of information. Thanks in advance, Marionne Waninge Re: Get endpoint url in freemarker Ah cheers! Sorry haha, i'm right on it:smileytongue: Yeaah that a good fallback probably.. I will do that. ThanksDougS! Re: Get endpoint url in freemarker HiDougS Thanks for the reaction, but as mentioned in the post, getting the community ID is not the problem.. Although it is nice to know, the community.id is not strictly required by the apache rewrite :) But please read the original postagain. from the post: in env A:/etgtr99956/plugins/custom/kpn/kpnbus/post-message in env B: /kpn/plugins/custom/kpn/kpn/post-message The first diff (etgtr99956,kpn) is easy to fix, becausethats just the ${community.id} but the second (kpnbus, kpn) is no logic difference, so it cannot be filled up easily with an existing variable. So the problem is.. How to get the 'kpnbus / kpn' difference in freemarker.. Both environments are called 'kpn'.. So how lithium makes it 'kpnbus' is a mystery Thanks Get endpoint url in freemarker Hi Guys, We have multiple environments running, allwith a different URL.. On all the environments, we use a custom endpoint.. They are the same (code is just copied to other environment), but the URL is different in environments, but we cannot get the 'absolute' url to the endpoint in an easy way.. So we have to do ugly if/else statements to change the url.. Example: If we call the endpoint: in env A:/etgtr99956/plugins/custom/kpn/kpnbus/post-message in env B: /kpn/plugins/custom/kpn/kpn/post-message The first diff (etgtr99956,kpn) is easy to fix, becausethats just the ${community.id}, but the second (kpnbus, kpn) is no logic difference, so it cannot be filled up easily with an existing variable.. Thus we have to do ugly if/else statements, like this -> <#if community.id == 'etgtr99956'> <#assign url = '/etgtr99956/plugins/custom/kpn/kpnbus/post-message' /> <#elseifcommunity.id == 'kpn' && env == stage> <#assign url = '/kpn/plugins/custom/kpn/kpn/post-message'/> <#else> <#assign url = '/kpn/plugins/custom/kpn/kpnbus/post-message'/> </#if> So point is: Is there an easy way to get theabsolute url to the endpoint from within freemarker? Thanks! SolvedRe: Stripping HTML when posting message through API OlivierS wrote: @KPNOnlinehave a look at this thread, it might help. ThanksOlivierS, I had a look at the thread before indeed.. But this encouragesusing a 'custom' set of allowed elements/attributes, or removing all html all together with utils.html.stripper.from.gdata.strip.... Message markup must be preserved and with custom elements/attributes there is still no guarantee lithium accepts it as a 'valid' message Problem is, lets say someone makes a message, like this: <img class="invalid" my-invalid-attr="invalid" src="/valid/valid.jpg"/> The invalid attributes need to be stripped of, otherwise Lithium will not allowthis message to be saved. I could copy all the lithium allowed elements/attributes into a customutils.html.stripper.from.owasp..But problem then, if Lithium decidesto change the rules regarding html/attributes, it would potentiallybrake as invalidmessage.. When using the default lithium TinyMCE editor, the backend 'cleans' the message if it contains illegal elements/attributes, sends it back to the client for review and users re-send the message. Is there a way to inherit that flow, by using the 'clean' method Lithium uses itself? Thanks Stripping HTML when posting message through API When posting a message through the REST API, it can happen a user inserts unvalid HTML into the message body. When the server replies with an error status 100, it says it changed the HTML, but thats not true. That only applies when using the default tinyMCE editor Lithium suplies. So question is: is there a function that strips out the HTML to become 'valid', trough Javascript OR Freemarker Util? For example, the smileys used from within tinyMCE, contain img attributes that are not allowed once 're-used' (like the class=""). So has to be stripped out. I found this: http://community.lithium.com/t5/Developers-Knowledge-Base/utils-FreeMarker-context-object/ta-p/9345 utils.html.stripper.from.owasp But not sure if its any good. How is it done on the backend of Lithium? Thanks Getting mentions via API when posting message We started building our own reply editor, and everything works fine (upload, posting etc).. All can be done through the API. But I can't seem to find a way to create mentions.. When a user starts typing, it has to look for users 'containing' the input text. So you would think, its possible to make a api call to /users.. Retrieving all the users which username startswith the typed text.. But the API v2 only matches on complete words, not partially.. Is there a way to do a SQL LIKE %text through the API? To retrieve users which username 'contains' the input text instead of a full match? Thanks Re: change values in escalation via rest apiIs this already possible? As of 08-2015 I can still not find the possibility