Forum Discussion

colinkahn's avatar
12 years ago
Solved

How do you get all the the tbk articles started by a user using the REST API?

Hi, 

 

I'm looking for a way to get the number of all the articles in the Tribal Knowledge Base that a user started.

 

The only route I've found that is possibly close to this is: users/id/<id>/posts/threads/count. I'm not sure though if threads are the same as articles in the Knowledge Base though.

7 Replies

  • colinkahn's avatar
    colinkahn
    Guide
    12 years ago

    Ah, I had thought using the board id might be the way to go but I couldn't figure out how to get the board ID of the TKB. At first I thought using /boards through the REST API should return a list w/ ids, but it didn't return anything. So, how can I get the board ID?

  • DougS's avatar
    DougS
    Khoros Alumni (Retired)
    12 years ago

    You could do the /boards/style/tkb/nested call to find all the TKBs in your community and get the id for each TKB from the result of that call.

  • colinkahn's avatar
    colinkahn
    Guide
    12 years ago

    Hmmm, this seems to give me a bunch of boards defined in the TKB, i'm looking to get the number of all posts a user has started in TBK across all of these listed boards. Is that possible?

  • colinkahn's avatar
    colinkahn
    Guide
    12 years ago

    After look at this more I believe the solution would involve being able to get the count for all Discussions started by user where the interaction style of the Discussion = tkb. 

     

    I don't see a way to do that though in the REST API docs. Can someone either confirm this can't be done with current API or point me in the right direction?

  • DougS's avatar
    DougS
    Khoros Alumni (Retired)
    12 years ago

    ah yes, good call on the metrics (should have thought of that). :)