As far as anyone knows is there a way to transfer posts, etc., from PROD to STAGE
Has anyone come up with a script to do this? Querying Production and Posting to stage with either curl or the API? It would just be nice to be able to populate more and more realistic content on the Stage instance. Or even just to post articles programmatically? There's the REST API https://developer.khoros.com/khoroscommunitydevdocs/reference/rest But I don't see where the body of the messagePostBody goes. Example: POST (Create): <#assign subject = http.request.parameters.name.get("subject", "") /> <#if subject?length gt 0> <#-- Build the requestBody parameter and assign it to a variable--> <#assign messagePostBody = { "type": "message", "subject": subject, "board": { "type": "board", "id": "Otis" } } /> <#-- Make your REST call --> <#assign resp = rest("2.0", "/messages", "POST", messagePostBody) /> ${apiv2.toJson(resp)} <#else> { "status": "error", "message": "no subject parameter passed." } </#if> Do I just add a "body" member property to that messagePostBody with whatever the body of the message is? Or is there some esoteric way of doing it? For the example given, PUT: <#assign messagePostBody = { "type": "message", "id": "34", "subject": "How do I post a REST API message?" } /> There's a subject, a type, an id, but no body. How do I add body content? Or do I have to use cURLas noted here in "recipes"? Does one need to authenticate using cURL? Can it be done within components? A lot of this seems vague. There's not a lot of context I can find. Most recipes have instructions for what to do with the ingredients ... https://developer.khoros.com/khoroscommunitydevdocs/recipes/create-a-new-message-with-products Do we run this in Freemarker? How? Do we create a component? Do we use authentication? How? In a terminal? With a fox? In a box? With green eggs and ham? 😉 This would be very helpful information. These "recipes" assume a lot of knowledge about how to use cURL within the Khoros Community that isn't provided. I would love to run this in a component. But there's no information nearby that explains that. Please clarify? A lot? Complete examples in the context of the Community product would make all the difference. curl --request POST \ --url https://community-domain/api/2.0/messages \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' { "data": { "type": "message", "board": { "id": "runningShoes" }, "subject": "Alternative to Nike Revolution Running Shoes", "body": "I have the Nike Revolution Shoes and got the Reebok Protonium shoes, but it feels very stiff while running - not much comfort/cushion while running and uncomfortable. I originally switched to Saucony because it was very comfortable and lightweight. suggestions for Saucony running shoes for women? I run only about 10mi/wk. <li-image id=\"336i254DB2339\"/>", "tags": { "items": [ { "text": "trail running" }, { "text": "running shoes" } ] }, "labels": { "items": [ { "id": "RunningShoes", "text": "Running Shoes" }, { "id": "Suggestions", "text": "Suggestions" } ] }, "products": { "items": [ { "id": "54" }, { "id": "56" } ], "list_item_type": "product" } } } Thanks, just rather unclear on the documentation around this.Solved505Views0likes13CommentsBulk API request using python failing
I have tried both the examples recommended for python and both are failing with different errors. access_token = "<my api token>" # Place the "Bulk API access token" from Community Analytics here client_id = "my client id" # Place the "Client ID" from Community Analytics here response = requests.get( 'https://api.lithium.com/lsi-data/v1/data/export/community/communityid', params={'fromDate': '20210630', # Set the start date in YYYYMMDD format 'toDate': '20210707'}, # Set the end date in YYYYMMDD format auth=(access_token, ''), headers={'client-id': client_id, 'Accept': 'application/json' } data = response.json() print(data) Output: SSLError: HTTPSConnectionPool(host='api.lithium.com', port=443): Max retries exceeded with url: /lsi-data/v1/data/export/community/communityid?fromDate=20210630&toDate=20210707 (Caused by SSLError(SSLError(9, '[X509] PEM lib (_ssl.c:4109)'))) request = urllib2.Request("https://api.lithium.com/lsi-data/v1/data/export/community/communityid?fromDate=20210701&toDate=20210707") base64string = base64.b64encode(('%s:' % access_token).encode('utf-8')) request.add_header("Authorization", "Basic %s" % base64string) request.add_header("client-id", client_id) request.add_header("Accept", "application/json") response = urllib2.urlopen(request) print(response.read()) Output: ---> 10 response = urllib2.urlopen(request) HTTPError: HTTP Error 500: Internal Server Error450Views0likes1CommentBulk data API - Category nodes
Question for the greater community as we've gone back and forth with Support/PS teams who don't seem to 'get' what we are asking, or we are horrendously bad at explaining this. When utilizing the bulk data API, can you truly retrieve details for 'Category' nodes? As we pull back data on our end, we get it for all nodes such as TKB, Blog, Forum, Ideas, etc, but we are not seeing anything come across for Category specific nodes nor the Community Homepage. They keep telling us to look at the ancestor path, but we don't want the path/node the article lives in, we want to literally see the visits to category pages since they make up a large portion of traffic. Does the Bulk data API actually provide results for Category nodes and/or the Community homepage itself? Edit: See image for example of data we're pulling - "Board_title" pulls back all 'board' nodes, while everything "blank" in board_title is things like member entrances, not anything to do with views/visits. Similarly, under the "community_app" field, there is no "category" option, just board options, while the 'blanks' option provides nothing of value to show us "Category" or "Community Homepage" on the site. x xx434Views3likes0CommentsLithiumVisitor decryption & bulk API visit id access
Hi all, I would greatly appreciate any insight into a few questions I have surrounding both visitor cookies and a property exposed via the bulk data API: How can I decrypt the LithiumVisitor cookie in order to access the underlying “visitor.id” value? I'm looking to gather some metrics on un-authenticated users. My understanding withvisit.id (available via bulk data API) is getting generated internally, do I have access to it anywhere on the client side? Is it only generated for authenticated users? Thanks401Views2likes9CommentsBulk Data API - new user questions
Hi, we have just started using the Bulk Data API to get data from production and our team have a couple of questions that hopefully are simple to answer. We can't find the answers in the docs or here so sorry if these are covered somewhere else. 1.fromDate and toDate is what we’re using to fetch the data. Just not entirely sure if it maps to the timestamp of event.time.ms or if it’s another timestamp (i.e. when event was processed, when event was made available for export, etc). 2.Does this endpoint paginate results in any way or is it always one giant dump? Thanks!Solved334Views0likes7Commentsvisit duration not available for visits.visit-summary events in Bulk Data API v2
Hi there, Does anyone know the reason why some of the 'visits.visit-summary' events might not be propagating anything in the visit_duration? According to the Bulk Data API v2 documentationthat is the sole purpose of this action_type. Also, does anyone know how is the visit_duration generated for single action_type visits such as view? Can someone please help our team figure this out?224Views0likes5CommentsData/Metrics on Subscriptions
Hi there, I got a question that I thought would be straight-forward, but doesn't seem to be: "how many users are subscribed to category XYZ?" Apparently there's no good way to answer this? In looking through the documentation and forum, all I was able to find was this documentation here: https://developer.khoros.com/khoroscommunitydevdocs/docs/get-a-count-or-list-of-users-subscribed-to-a-board?_ga=2.165259263.1583072279.1692296336-111620096.1668529588 This is using a) the outdated v1 of the API and b) only returns counts for boards, blogs, or Groups. What about Group Hubs and Categories? Is there really no way to get a list of everyone who's subscribed to a particular Category? Thanks for any help!218Views1like6CommentsBulk API in PowerQuery
Hello. I am trying to fetch data with the Bulk API using Power Query (Excel / PowerBI), but I'm facing issues in the identification. I have several options (anonnymous, windows, basic, API web). I tried all of them, but could not connect. I have my Client ID and access token in the Analytics page (I also tried to reset token), but I can't find how to authenticate wih Power Query. How can I do it, please?200Views0likes3CommentsNeed better example of Bulk Data API
I see the example CSV file for Bulk Data API, but it only has a few event types(rss.feed-request, view, visits.member-entrance, visits.visit-summary). Can Khoros supply a more complete example, ideally with one of each event type represented, and the new V2 fields.Solved200Views0likes3Comments