Recent Discussions
API for newly published articles?
I'd like to automate social copy drafts in our social media platform for newly published articles. I can't seem to find the right combination of attributes / tables in a LiQL call OR the right API method that will give me what I'm looking for. I just want the last 10 articles that were published. I get the last updated, which could be older articles, and I published one two days ago that was a draft a month ago. That doesn't show up in my query of 10 at all as it's out of range, unfortunately. Any advice on how to accomplish this would be appreciated. The LiQL query I'm using: query = f"SELECT id, view_href, body, last_publish_time FROM messages WHERE board.id = 'TechnicalArticles' ORDER BY manual_sort limit 10"Solved250Views0likes4Commentspermissions for the user biography based on user roles
Hello, We have a requirement regarding user biography field (my settings > personal > personal information > biography). Is it possible to set permissions for the user biography based on user roles? Specifically, we need to disable the biography field for normal users. Thank you.Solved262Views0likes2CommentsTrouble with http.client.response
I'm making the following http.client.request call in an endpoint. <#assign response = http.client.request("https", "api.cognitive.microsofttranslator.com", "/translate?api-version=3.0&to=es&textType=html") .header("Ocp-Apim-Subscription-Key", "MyKeyGoesHere") .header("Ocp-Apim-Subscription-Region", "eastus") .header("Content-Type", "application/json") .body("[{'Text':'<p class=\"some-class-ak\">Hello, what is your name?</p>'}]", "application/json") .post() /> <#if response.hasError> ${response.error.message} <#else> ${response.content} </#if> Testing in postman I got this response. [ { "detectedLanguage": { "language": "en", "score": 1.0 }, "translations": [ { "text": "<p class=\"some-class-ak\">Hola, ¿cómo te llamas?</p>", "to": "es" } ] } ] However, from the endpoint I see this with the quotes encoded and an error in the console. I'll copy both below the image. [{"detectedLanguage":{"language":"en","score":1.0},"translations":[{"text":"<p class="\"some-class-ak\">Hola, ¿cómo te llamas?</p>","to":"es"}]}] json_document.js:1 SyntaxError: Expected property name or '}' in JSON at position 7 (line 2 column 7) at JSON.parse (<anonymous>) I've done similar things before and received recognizable JSON, so I'm not sure what I'm doing wrong. I have the endpoint set to apllication/json Any help would be appreciated. Thanks!Solved240Views1like4CommentsChange header logo link?
Where would I change the href in the header logo link? I cannot find anywhere to edit this code. Currently it defaults to "/" but i'd like it to point elsewhere: <div class="custom-community-header-logo"> <h1> <a href="/" style="background: url('<logo-image>') no-repeat 50% / contain;"></a> </h1> </div>Solved355Views1like7Commentsquery with date field
trying to find out posts between two dates in "message" i have something like https://mycommunity/api/2.0/search?q=SELECT%20post_time,%20post_time_friendly%20FROM%20messages%20WHERE%20ipost_timeBETWEEN TWO dates so, the query is pretty much SELECT post_time, post_time_friendly FROM messages Where [post_time between two date] i am open to use either post_time or post_time_friendly But my question is how to fit in the 2 dates. I tried different ways but none works anyone can help? thanksSolved329Views1like8CommentsBlock New Replies - API?
Hello everyone. I am new to development for the community that I manage and am looking for guidance on solving a process that we are attempting to accomplish. In summary, we have a mature community of over 12 years with a large number of threads that are considered dated. Once we set up the parameters to isolate these threads we'd like to block new replies. To my knowledge there is no way out of the box to accomplish this in bulk and one by one is simply not reasonable. I believe that API calls would be my solution here and I have no idea where to begin. Any help would be truly appreciated. We are current on community version24.2 (24.2-release r2404161404) and havenot updated to Aurora yet.Solved162Views1like3Commentshttp.client.request is caching the response being received from the third-party API. Not required.
http.client.request is caching the response being received from the third-party API for about 5 seconds( approx ,the actual value can be different ). (Ex: <#assign translatedResp = http.client.request("https","${url}","${endpoint}"). parameter("key","${apiKey}").header("Content-Type","application/json").body("${bodyObjString}", "application/json").post()/> ) The use-case I am looking at is using one particular endpoint to make separate calls with different parameters one after the other. But, I am not able to do so since the endpoint is returning the same response even after the call made is different, with different parameters. If I do set a delay of about 5 seconds after every call, it is able to respond back the fresh response, but it is not optimal to have this much delay. How do I set the output/response to not be cached at all?Solved145Views0likes2CommentsIntegrating Community with Google Translate
Hi We are exploring integrating google translate into our community. So, I had a couple of questions. Google uses Oauth 2.0 as detailed herehttps://developers.google.com/identity/protocols/oauth2/service-account#httprest which I am completely unfamiliar with. So, I have been slowly working my way through these instructions to request the access token from google. I'm up to generating the signature which google says requires RSA SHA256 algorithm. In the Khoros documentation I found thisdigest.hmac("algorithm","key","message") (khoros.com)and it looks like I can use HMAC SHA256. Again, all of this is Greek to me😀 but a little searching tells me HMAC and RSA are two different things. So, does anyone know if RSA is possible with Khoros? I can't find anything about it in the documentation. Also, has anyone else done this kind of integration specifically with google translate? If so, can you share how to do this authentication? Thanks!Solved242Views0likes4CommentsNeed 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-metricsbut 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 APIKhoros CommunitiesBulk Data APISolved169Views0likes2Comments