Any cons of NOT using LITHIUM.jQuery when calling an endpoint from a component?
Hi folks, I was wondering if using LITHIUM.jQuery when calling endpoints is the only preferred way of doing it: <@liaAddScript> ;(function ($) { $(document).ready(function () { function callLithiumEndpoint() { $.ajax({ url: '${endpointUrl}', }) } callLithiumEndpoint(); }); })(LITHIUM.jQuery); </@liaAddScript> Can it be done with vanilla JavaScript inside a <script> tag as well, for example using fetch? I noticed that endpoints can be triggered from a browser or a postman via their path https://<community-name>/pjakv59666/plugins/custom/<some-path-to-endpoint>/<component-name> Can it be treated as a simple url, passing there parameters and parsing it?Solved1.7KViews1like2CommentsIssues with batched queries
Hi, I'm trying to create a batch request fetching the latest posts in a users favorite areas, the number of unread messages and the number of notifications. I have had some partial success so far but I've run into two issues: I can't find any documentation on how to do ordering in a json query. I can't constrain the query for notification_feed to a specific user in api/v2 as I could in api/v1. Is there any other good solutions for getting the notification count for a user [ { "query":{ "messages": { "fields": [ "id", "subject", "teaser", "body", "view_href", "post_time", "conversation.featured", "conversation.style", "conversation.last_post_time", "conversation.last_post_time_friendly", "author.id", "author.href", "author.view_href", "author.login", "author.avatar.message", "board.id", "board.title", "board.parent_category.title", "metrics", "kudos.sum(weight)" ], "constraints": [ {"category.id": {"in": ["<<category1>>", <<category2>>"]}}, {"depth": {"=": 0}} ], "limit": 5 } } }, { "query":{ "inbox_notes": { "fields": ["id", "is_read"], "constraints": [ {"user.id": {"=" : "<<id>>"}}, {"unread_only": {"=": true}}] } } }, { "query":{ "notification_feeds": { "fields": ["id"] } } } ]Solved1.5KViews0likes4CommentsLab / Idea / Unconference Meetup?
I have a couple things on my community backlog that probably require some level of customization - I tend to be looking for stuff in Atlas that already has some traction or headway AND I see lots of "under consideration" ideas AND I see lots of "Did anybody make an XYZ widget in their community..." questions BUT what I haven't yet found (beyond this forum itself) is an available time and place for Devs to get together on their own and either attack a specific common problem OR talk together through a top of mind issue. It could be anything from a KhorosLed affair or even just an Unconference we put on ourselves. Would be REALLY great if there was a vanilla lab stood up to do actual live-action work that participants could then try to leverage in their own environments later. Am I just not finding this yet? Do we need to bootstrap something? BlakeH - has this come up before?1.3KViews10likes26CommentsAPI v2 Search doesn't work
Reading this page, I quote: "In v2, perform a one-or-more term search with a comma-separated list of terms wrapped in parentheses. Use this when you want to return messages that have at least one of these terms in the defined fields. WHERE subject MATCHES ('apples', 'bananas', 'cherries')" This query returns 2 results: select subject,body from messages where subject matches 'attachment' This query returns 0 results. select subject,body from messages where subject matches ('attachment','android') According to the documentation I should be getting results. Fair to say that it's not WAI?1.1KViews0likes9CommentsAPI call to post message has blank response
Hi folks. Been using this in an endpoint for many years, but now it returns a blank response, so I can't read if it was successful. <#assign result_post = restadmin("/boards/id/${board_id}/messages/post?message.subject=${msg_subject?url}&message.body=${msg_body?url}")/> If, however, I do a simple $.post('/restapi/vc/boards/id/${board_id}/messages/post?message.subject=subject&message.body=body') then I get a perfectly normal response. Did something change with the v1 API?800Views0likes6CommentsWhere do I store a large amount of data, for reference?
Hi folks, planning a custom component which will basically check the user's id against a pre-existing list. I imagine this list could grow into the thousands. What are my options for storing this data/list? One option I use for smaller datasets is a hidden post and simply store it as a comma separated string. Another option might be to store a string in a custom metadata field, I guess? Any ideas how large that could be? (I don't have access to a separate server.)752Views2likes5CommentsAPI Authentication
Hi, I'm new to the Khoros community and looking for some clarification on API authentication. Specifically, is it required for GET requests? I see it is listed as required in the API documentation but in practice, I am not running into any permissions error when testing on community.khoros.com. Example: GET https://community.khoros.com/api/2.0/search?q=SELECT * FROM categories Thank you for any insight!Solved740Views0likes3CommentsCan someone walk me through authenticating and using Postman with Aurora?
I'm a bit of a newbie when it comes to GraphQL and Postman and I'm struggling to work through the dev docs when it comes to authenticating and setting up the basics in Postman for testing in API calls in Aurora. We're looking ahead to migration and want to start getting familiar with basic API calls. Has anyone successfully got Postman and Aurora working? Is anyone willing to walk me through the bare minimum basics of getting this set up to authenticate into our Aurora instance and run a basic GraphQL call? I'm finding the dev docs pretty lacking currently so I'm turning to the expertise of the developer community here hoping someone has already figured this out. Or, if Khoros is reading this, can we have another Developer Webinar where we can walk through this? Or is this something you can offer through training or update the docs with more details? We've reached out to our CSM to see if we can get some 1:1 training but so far it doesn't look like that's an option right now.Solved700Views2likes13CommentsSDK - Gulp errors
Hello! I'm trying to install and setting up Community SDK plugin at my machine. After some issues related to the node version used by the plugin, I was able to export the Studio plugin. I can see all the folder structure and files, but when I run gulp, I have this error message: [14:04:07] 'plugin-build' errored after 314 ms [14:04:07] TypeError in plugin 'run-sequence(watch-text)' Message: Cannot read property 'map' of undefined Stack: TypeError: Cannot read property 'map' of undefined at Gulp.<anonymous> (/Users/xxx/community/community-project/node_modules/lithium-sdk/gulp/watch.js:111:55) Does anybody have a solution for this? Can be dependencies that are no longer compatible with the way that gulpfile have been written?676Views0likes10CommentsUnable to change SSO ID of user with the API
Hey all, We need to update the SSO ID of our users systematically and I am writing a Python script to do so. However, when attempting to do so in the API v1 using a POST call to the /users/id/{id}/sso_id/set endpoint, I am getting the following response. { "response": { "status": "error", "error": { "code": 303, "message": "Permission Denied" } } } I am authenticated as a user with full admin privileges so I'm not sure why I would be getting the Permission Denied message, especially since my user can change SSO IDs via Community Admin just fine. The payload (value=) is also a simple numeric string so it shouldn't be due to invalid. characters or anything. Anyone ever experienced this and know how I can get around it? Thanks in advance!Solved657Views0likes10Comments