Public
Occasional Advisor

Can you add metadata to "My community content"?

Hello! Over on the Atlassian community, I wrote a post about how it might be interesting/fun for users to data mine posts that they had made on the forum:

Digging through your post stats by downloading your community content as JSON and parsing it 

The problem, unfortunately is that to answer interesting questions like, "How many posts about Cloud I do every month?" or "Do I spend more time answering questions at night, or in the morning?" we would need a little more metadata.

Currently "My community content" contains links to every image a user has uploaded, as well as the text of every message that has been posted.

But what's missing is things like timestamps or tags. It would also be useful to know what product area (not sure what this is in Khoros-speak - Category?) we we posted to.

Does anybody know if this is something that can be easily added or customized? Or are we dependent on Khoros providing this functionality?

Thanks!

5 Replies 5
Honored Contributor

I'm going full on Inception in this response....

Khoros actually has an open API, but the documentation is behind the scenes only for their customers. So as a end user, you just need to go deeper.... into the Atlassian Community:

https://community.atlassian.com/t5/Feedback-Forum-articles/Use-the-Community-API-to-query-tags/ba-p/...

That's specific to tags, but there's a lot you can pull from it. 

The downloads you reference are primarily there to support GDPR if I recall correctly, so not necessarily the use case you are going for, but still love the fact you are hardcore enough to come to the vendor's website to seek answers!

Occasional Advisor

WHOA! How did I not find that post? (So, I've gotta make a small complaint that sometimes Khoros's search engine leaves me wanting.)

That looks right up my alley. And aha, there's the one thing I was going to ask about - can I query by user ID? Looks like the answer is yes!

Excellent.

tenor

Occasional Advisor

@StanGromer thank you so much for pointing me to that article. I wrote instructions to allow other Atlassian Community members to start pulling down all of their messages, so hopefully everyone gets to bang their head against parsing JSON files soon. (jq is my drug of choice.)

I was wondering about one thing though:

I was hoping I could combine an author.id query with the tags that Tyler details in his article to get something like:

SELECT * FROM messages WHERE tags.text = 'cloud' AND author.id='1365322' LIMIT 1000

But weirdly that only brought up my most recent post about 'cloud'. I have a feeling the 1000 message limit kicks in *before* the author.id filter can be applied.

I'm fully up for more digging into LiQL, but figured I'd ask the experts here. :-}

@darryllee lol, I can partially help, lol. I'm not an engineer but instead have read far to much in here 😂

1000 is the max, so you'll have to use pagination with OFFSET. And that's where my technical abilities start to vanish but hopefully make sense to you. Depending on how much access you have in ATLAS, you'll find various threads detailing it but a lot of it points to the V2 API documentation.

Occasional Advisor

Hey thanks @StanGromer - you've already helped immensely.

Yes, I understand the 1000 result limit and OFFSET.

Somebody at Atlassian figured out that the problem I'm getting so few requests is that my posts don't actually have the tags I'm looking for (because I'm mainly replying to questions). It's the parent messages that have those tags.

So I can get all the parent.ids with this query:

SELECT parent.id FROM messages WHERE author.id='1365322' LIMIT 1000

And then I can get the tags for a particular message thusly:

SELECT * FROM tags WHERE messages.id='1628420'

I think what I'm really looking for is something like a Nested Query in SQL:

 

SELECT * FROM tags WHERE messages.id IN (SELECT parent.id FROM messages WHERE author.id='1365322' LIMIT 1000)

 

But heh, unsurprisingly, LiQL doesn't appear to support that.

(Edit: Also, reading the docs, it's clear I want topic.id, not parent.id.)

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.